From: Junio C Hamano <gitster@pobox.com>
To: Harald Nordgren <haraldnordgren@gmail.com>
Cc: Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 3/3] bisect: add --auto-reset to leave when done
Date: Thu, 16 Jul 2026 22:00:09 -0700 [thread overview]
Message-ID: <xmqqpl0m9pnq.fsf@gitster.g> (raw)
In-Reply-To: <CAHwyqnUFfewFm7tr-Busv1rKP=4Rqnq+vJ7mEdgbaRLKbpbo=g@mail.gmail.com> (Harald Nordgren's message of "Thu, 16 Jul 2026 23:22:24 +0200")
Harald Nordgren <haraldnordgren@gmail.com> writes:
>> > 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.
prev parent reply other threads:[~2026-07-17 5:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 5:35 [PATCH 0/3] bisect: add --auto-reset to leave when done Harald Nordgren via GitGitGadget
2026-07-16 5:35 ` [PATCH 1/3] bisect: read run output from the open descriptor Harald Nordgren via GitGitGadget
2026-07-16 5:35 ` [PATCH 2/3] bisect: let bisect_reset() optionally check out quietly Harald Nordgren via GitGitGadget
2026-07-16 5:35 ` [PATCH 3/3] bisect: add --auto-reset to leave when done Harald Nordgren via GitGitGadget
2026-07-16 17:22 ` Junio C Hamano
2026-07-16 21:22 ` Harald Nordgren
2026-07-17 5:00 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqpl0m9pnq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=haraldnordgren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox