Re: [PATCH 3/3] bisect: add --auto-reset to leave when done
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 17, 2026, 05:00 UTC
- Message-ID
- <xmqqpl0m9pnq.fsf@gitster.g>
- In-Reply-To
- <CAHwyqnUFfewFm7tr-Busv1rKP=4Rqnq+vJ7mEdgbaRLKbpbo=g@mail.gmail.com>
Harald Nordgren <haraldnordgren@gmail.com> writes:
Show 16 quoted lines
>> > 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. >> >> I often find myself, after the culprit is found, running 'git >> reset --hard' or 'git bisect reset' to jump to the problematic >> commit to investigate further. If '--auto-reset' leaves me >> checked out on that bad commit, that would be a very welcome >> change. > > No it's the opposite, returns to where we started before the bisection. > > I don't mind changing it assuming no one likes the original idea. I > guess the name shouldn't be '--auto-reset' then.
Since "git bisect reset <goto>" is just as common as a plain "git bisect reset" (which implicitly uses the original branch as the target), I suspect that an option like "--auto-reset=<where>" with values like "original" or "found" might be appropriate. And I would not mind if omitting the value defaulted to "original".
The point I was trying to make is that where to reset depends more on the situation the user is in, rather than on their personal preference. I would mind if you changed it to always reset to the culprit, just as much as I would mind if it always reset to the original.
Thanks.