diff options
| author | Harald Nordgren <haraldnordgren@gmail.com> | 2026-08-02 21:24:20 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-08-02 16:34:36 -0700 |
| commit | f70281521a06894e51b5acfa9abbbb884c05d980 (patch) | |
| tree | fa407e600ccbb2d1c8018773cf1b67797ba75276 /t/t4013/diff.diff_initial..side | |
| parent | 2e59acb77df349c5aaf06b4194fbbbcf0556d3ba (diff) | |
bisect: add --reset-when-found to leave when done
When a bisection finishes, "git bisect" reports the first bad commit
but leaves the session active until "git bisect reset" is run by hand.
Add a "--reset-when-found[=<where>]" option, accepted by both "git
bisect start" and "git bisect run", that resets as soon as the first
bad commit is found. The "original" value returns to the commit checked
out before "git bisect start", while "found" leaves the first bad commit
checked out; omitting the value defaults to "original".
Persist the selected target in a BISECT_RESET_WHEN_FOUND state file
and perform the reset quietly.
Let the internal first-bad result propagate to cmd_bisect(), which
performs the reset using the existing bad bisect ref after the
subcommand has returned. For "git bisect run", this means BISECT_RUN
has been printed and closed before cleanup, which also works on systems
that cannot unlink an open file.
Reject this option together with "--no-checkout", since that mode must
not check out either target.
Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
