From: Jeff King <peff@peff.net>
To: Adam Dinwoodie <adam@dinwoodie.org>
Cc: Christian Couder <christian.couder@gmail.com>, git <git@vger.kernel.org>
Subject: Re: Bisect marking new commits incorrectly
Date: Wed, 22 Nov 2017 16:37:52 -0500 [thread overview]
Message-ID: <20171122213751.GC2854@sigill> (raw)
In-Reply-To: <20171122170129.GS20681@dinwoodie.org>
On Wed, Nov 22, 2017 at 05:01:29PM +0000, Adam Dinwoodie wrote:
> > So if you test a commit that git bisect asks you to test, and it
> > appears that this commit is "new", then you can just discard the
> > previous "new" commit because it will give you less information than
> > the new "new" one.
> > (The old "new" will not let you discard any commits that the new "new"
> > commit allows you to discard, because it is a descendant of the new
> > "new" commit.)
> >
> > If you don't test the commit that git bisect asks you to test, then
> > git bisect assumes that you know better and discards the old "new".
>
> Ah, that makes sense, thank you for the explanation.
>
> In my case, I knew two commits were "new", but didn't know which would
> provide more information to the bisect algorithm; I'd assumed if I
> provided both, Git would work out the appropriate thing to do with the
> combined information without me needing to work it out.
Yeah, I really would have expected this to work, too. Should we be
taking the merge base of the set of "new" commits, and using that as the
true "new"?
I.e., with this graph:
A--B--C--D
\
E--F
if I mark D and F as bad, can we assume that B, C, and E are "new", too,
and treat "B" as the new single "new"? That breaks down if the bug was
introduced independently on each branch, but I think bisect explicitly
doesn't handle such a case.
What might give it trouble is if there are multiple merge bases, like:
G--H-----
/ \ \
A--B--C--D \
\ \
E--------F
The flip to "new" could have been on the G-H branch, or in B.
So maybe that's not workable.
(I've never really dug into the bisect algorithm, and this is written
largely off the cuff, so I'm fine if the response is "nope, you have no
idea what you are talking about").
-Peff
next prev parent reply other threads:[~2017-11-22 21:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 14:39 Bisect marking new commits incorrectly Adam Dinwoodie
2017-11-22 16:21 ` Christian Couder
2017-11-22 17:01 ` Adam Dinwoodie
2017-11-22 21:37 ` Jeff King [this message]
2017-11-24 5:29 ` Junio C Hamano
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=20171122213751.GC2854@sigill \
--to=peff@peff.net \
--cc=adam@dinwoodie.org \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).