Skip to content

bisect: add --auto-reset to leave when done#2335

Draft
HaraldNordgren wants to merge 3 commits into
git:masterfrom
HaraldNordgren:bisect-auto-reset
Draft

bisect: add --auto-reset to leave when done#2335
HaraldNordgren wants to merge 3 commits into
git:masterfrom
HaraldNordgren:bisect-auto-reset

Conversation

@HaraldNordgren

@HaraldNordgren HaraldNordgren commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Add a --auto-reset option to git bisect start and git bisect run that returns to the commit checked out before git bisect start as soon as the first bad commit is reported, instead of leaving the session active until git bisect reset is run by hand.

"git bisect run" redirects each step's output into BISECT_RUN, then
prints it back by reopening the file by name. Read it from the already
open descriptor instead; this behaves the same and no longer needs the
file to be reachable by name.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Add a "quiet" parameter to bisect_reset() that passes "--quiet" to the
checkout restoring the original HEAD, suppressing its progress and
branch-status output.

No caller sets the flag yet, so behavior is unchanged.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
When a bisection finished, "git bisect" reported the first bad commit
but left the session active until "git bisect reset" was run by hand.

Add an "--auto-reset" option, accepted by both "git bisect start" and
"git bisect run", that resets as soon as the first bad commit is found,
returning to the commit checked out before "git bisect start". The flag
is persisted in a BISECT_AUTO_RESET state file and the restoring
checkout is done quietly.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
@HaraldNordgren HaraldNordgren marked this pull request as draft June 16, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant