A worked example, rendered from real sample data. Sign in to run the tool on your own input.
good=v2.3.0
bad=v2.4.0-rc1
commits=84
test=npm test -- payment
test_seconds=45═══ What this tool did ═══
✗ No repository was read, no commit was checked out and no test was run. There are no commit hashes, dates or messages here that you did not supply. This page runs entirely on the server that rendered it and makes no outbound network calls.
✓ What it computes is the bisect arithmetic: how many tests the search needs, which commit git picks at each step, and how the range narrows. That is deterministic — binary search has no randomness in it.
ℹ No git log was pasted, so the plan below uses 84 as the number of commits in v2.3.0..v2.4.0-rc1.
═══ How long the search takes ═══
Commits in v2.3.0..v2.4.0-rc1: 84
Tests needed: 7 (⌈log₂(84 + 1)⌉) — git prints this as "roughly 7 steps".
Linear search would need up to 84. Bisect turns 84 tests into 7: that is the entire point of it.
Doubling the range to 168 commits costs exactly one more test.
At 45s per test run, the search takes about 5m 15s of machine time.
═══ Session ═══
git bisect start
git bisect bad v2.4.0-rc1
git bisect good v2.3.0
# git checks out commit #42 from v2.4.0-rc1 — roughly 7 steps, 84 revisions left to test after this
npm test -- payment && git bisect good || git bisect bad
# …repeat until git prints "<sha> is the first bad commit"
git bisect reset
═══ Verdict ═══
✗ Which commit introduced the regression cannot be determined here. It is a property of your code and only running your test at each of the commits above can decide it.
• Add `first_bad=<sha>` (or `first_bad=<n>` for the nth commit) and this tool will replay the exact session for you.
═══ How git picks the co
…
Work out how many tests a bisect needs, which commit git picks at each step, and replay the session over your own git log. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.