July 2018
Intermediate to advanced
354 pages
10h 57m
English
Instead of running all the bisecting steps manually, it's possible to do it automatically by passing Git a script, makefile, or test to run on each commit. The script needs to exit with a zero-status to mark a commit as good and a non-zero status to mark it as bad. We can use the test.sh script we created at the beginning of this chapter for this. First, we set up the good and bad commits:
$ git bisect start HEAD master Bisecting: 11 revisions left to test after this (roughly 4 steps) [9d2cd13d4574429dd0dcfeeb90c47a2d43a9b6ef] Build map part 11
Then, we tell Git to run the test.sh script and automatically mark the commits:
$ git bisect run ../test.sh running ../test.sh Bisecting: 5 revisions left to test after this (roughly ...
Read now
Unlock full access