Expand description
Bisect.
Stores state in .mkit/bisect (a single file, NOT a directory). The
on-disk format is a plain-text manifest:
<orig_head_hex>
<orig_branch_or_empty>
<bad_hash_or_empty>
<good_hash_1>
<good_hash_2>
...
skip:<skipped_hash_1>
skip:<skipped_hash_2>
...The skip: prefix lines are additive — old state files without them
deserialize with an empty skipped set. pick_midpoint_skip skips
over any candidate whose hash is in skipped, searching neighbors.
Trailing whitespace on any line is tolerated on read.
enumerate_range and pick_midpoint form the search core; the
caller drives the loop, calling pick_midpoint on the candidates
returned by enumerate_range and updating bad/good based on the
tester’s verdict. BisectStep is a convenience response type.
Structs§
- Bisect
State - Persisted bisect state.
Enums§
- Bisect
Error - Errors raised by this module.
- Bisect
Step - Outcome of a single bisect iteration.
Constants§
- BISECT_
FILE - Single-file state path under
<mkit_dir>.
Functions§
- bisect_
file_ path - Convenience: full path to the bisect state file under
mkit_dir. - cleanup_
bisect - Remove
<mkit_dir>/bisect. Idempotent. - enumerate_
range - Walk ancestors of
bad, stopping at any commit that isgoodor an ancestor ofgood. Returns the candidate set in BFS order frombad. - is_
bisect_ in_ progress - Returns
truewhen<mkit_dir>/bisectexists. - next_
step - Drive a single bisect iteration: enumerate the range, then pick the midpoint or report completion.
- pick_
midpoint - Pick the midpoint commit. Returns
Hash::ZEROwhencandidatesis empty. - pick_
midpoint_ skip - Pick the midpoint commit, skipping over any commit in
skipped. - read_
state - Read bisect state from
<mkit_dir>/bisect. - write_
state - Persist
stateto<mkit_dir>/bisect.
Type Aliases§
- Bisect
Result - Result alias.