One Real Command, the Whole Search
git bisect start HEAD HEAD~45
git bisect run sh check-times.sh
git checks out each real midpoint itself, runs sh check-times.sh against it, reads the real exit code — 0 means good, anything else means bad — and keeps going until only one commit remains.
Any Real Pass/Fail Signal Works
git bisect run npm test
git bisect run ./run-integration-tests.sh
git bisect run make check
git bisect run does not care what the command actually does — only its real exit code. Any script, test suite, or one-liner that can answer "does this commit have the bug" automates the exact same search.
Same Ending, Zero Manual Steps
# bd3a361... is the first bad commit
# bisect found first bad commit
git bisect reset
The real output ends the same way as the manual walk — the exact commit, named directly — but nobody had to run the check or type good/bad even once.
check-times.sh is failing again — 45 more real "add a recipe" commits landed, and one of them is broken the exact same way as before. Lab 3.3.1's manual walk worked, but it needed a real human to run the check and type good or bad six times.
git bisect run automates that entire real loop: give it a real command that exits 0 for good and non-zero for bad, and git checks out every real midpoint, runs that command itself, and keeps going completely unattended until it names the exact commit responsible. The same real binary search, zero manual steps.
git bisect run <command>
Fully automates a bisect search — git checks out each real midpoint and runs the given command itself, reading its real exit code as the good/bad answer. Confirmed directly in this lab: the same 45-commit search that would have taken several manual rounds completed with a single command.
Takeaways
- git bisect run <command> automates an entire bisect search, checking out and testing every commit itself
- Only the real exit code matters: 0 is good, 1-124 is bad, 125 tells git to skip that commit
- Any real script, test suite, or one-liner that can pass or fail can drive an automated bisect
- The ending is identical to a manual walk — the exact commit, named directly, ready for git bisect reset