public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Andreas Schwab <schwab@linux-m68k•org>,
	Florian Bruhin <me@the-compiler•org>,
	git@vger•kernel.org, r.seitz@beh•ch
Subject: Re: git bisect with temporary commits
Date: Mon, 14 Dec 2015 13:17:03 -0800	[thread overview]
Message-ID: <xmqqegeoivcg.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20151214210936.GD14788@sigill.intra.peff.net> (Jeff King's message of "Mon, 14 Dec 2015 16:09:36 -0500")

Jeff King <peff@peff•net> writes:

>> You should instead tell git that HEAD^ is good, since that is what git
>> asked you to test.
>
> Another alternative is to use "git cherry-pick -n" to create a working
> tree state that you can test, but leave HEAD at the original commit.
> Then "git bisect good" does the right thing.

I was about to say the same, and "bisect good" at that point does
mark the correct commit, but does it always do the right thing?  I
think the procedure must be

	git cherry-pick -n $the_fixup
        test
        git reset --hard
        git bisect good (or bad)

for it to always work, which is not all that different from

	git cherry-pick $the_fixup
        test
        git reset --hard HEAD^
        git bisect good (or bad)

  reply	other threads:[~2015-12-14 21:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 16:37 git bisect with temporary commits Florian Bruhin
2015-12-14 18:08 ` Andreas Schwab
2015-12-14 18:22   ` Florian Bruhin
2015-12-14 19:21     ` Junio C Hamano
2015-12-14 19:38       ` Florian Bruhin
2015-12-14 20:17     ` Andreas Schwab
2015-12-14 21:09   ` Jeff King
2015-12-14 21:17     ` Junio C Hamano [this message]
2015-12-14 21:26       ` Jeff King

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=xmqqegeoivcg.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=me@the-compiler$(echo .)org \
    --cc=peff@peff$(echo .)net \
    --cc=r.seitz@beh$(echo .)ch \
    --cc=schwab@linux-m68k$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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