|
|
Subscribe / Log in / New account

Stochastic bisection in Git

Stochastic bisection in Git

Posted Dec 15, 2021 10:05 UTC (Wed) by farnz (subscriber, #17727)
In reply to: Stochastic bisection in Git by nix
Parent article: Stochastic bisection in Git

Or, in the grand tradition of Unix, invoke an external tool (configurable) to make the judgement call - git already knows about external diff and merge tools (which in theory can be language-specific), so an external tool to identify the "significance" of a change isn't a big stretch.


to post comments

Stochastic bisection in Git

Posted Dec 15, 2021 16:37 UTC (Wed) by nijhof (subscriber, #4034) [Link] (1 responses)

You could probably already do that today in git bisect run. In the command/script:
   if <this commit is insignificant>;   then
      exit 125 # tell git bisect to skip this commit.
   fi

Stochastic bisection in Git

Posted Dec 15, 2021 16:47 UTC (Wed) by epa (subscriber, #39769) [Link]

Yes, you can skip it altogether, but only if you're 100% absolutely certain it cannot affect the result.

I have lots of commits like 'whitespace' or 'renamed variable' or 'changed from private to public' where I am only 99% sure. So I would like git bisect to mostly disregard them when picking its midpoint to test, but of course, if one of these commits is the only candidate between the current bad and good labels, it should be built and tested.

That will also speed up bisection by making the search tree shallower (assuming the prior probabilities or scores assigned to each commit are broadly reliable). Doing the normal bisection and then skipping an individual commit will give a smaller speedup.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds