bisect: add --auto-reset to leave when done#2335
Draft
HaraldNordgren wants to merge 3 commits into
Draft
Conversation
abcc01d to
a507afb
Compare
"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>
a507afb to
1891e7d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
--auto-resetoption togit bisect startandgit bisect runthat returns to the commit checked out beforegit bisect startas soon as the first bad commit is reported, instead of leaving the session active untilgit bisect resetis run by hand.