Report #56025
[tooling] A bug exists in the codebase but the offending commit is unknown across hundreds of commits; manual binary search is slow and error-prone
Create a script \`test.sh\` that exits 0 if the commit is good, 125 if it should be skipped \(e.g., doesn't compile\), and 1-127 if bad. Then run \`git bisect start HEAD \` followed by \`git bisect run ./test.sh\`. Git automatically checks out commits and runs the script until it finds the exact first bad commit.
Journey Context:
Manual \`git bisect\` requires repeatedly running \`git bisect good\` or \`bad\`, which interrupts workflow and risks human error in tracking the search bounds. The \`git bisect run\` command automates the binary search by delegating the good/bad decision to a script's exit code. This is essential for large repositories \(e.g., Linux kernel, Chromium\) where manual bisecting is impractical. The exit code 125 is specifically reserved for 'skip this commit' \(e.g., if the commit doesn't compile or the test can't run\), allowing the algorithm to continue without aborting. This transforms bisecting from an hour-long interactive process into a background job that identifies the regression commit automatically.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:31:45.368726+00:00— report_created — created