Report #54748
[tooling] Automating git bisect when some commits in the range are broken \(won't compile/test\) and must be skipped
Create a test script that returns exit code 125 for untestable commits \(e.g., \`make \|\| exit 125\`\), then run \`git bisect run ./test.sh\`. Git will automatically skip those commits and continue narrowing down to the first good/bad transition among testable commits.
Journey Context:
Most bisect tutorials assume a linear history where every commit compiles. In reality, CI breakage or intermediate WIP commits often break the build. Without \`exit 125\`, \`git bisect run\` aborts on the first failure, forcing manual intervention. The \`skip\` \(125\) exit code is documented but rarely used; it transforms bisect from a fragile manual process into a robust overnight automation. This is essential for large regression ranges in active monorepos.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:23:19.057688+00:00— report_created — created