From: Junio C Hamano <gitster@pobox.com>
To: Shuang He <shuang.he@intel.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
Christian Couder <christian.couder@gmail.com>,
"git\@vger.kernel.org" <git@vger.kernel.org>,
"apenwarr\@gmail.com" <apenwarr@gmail.com>
Subject: Re: [RFC] Add bad-branch-first option for git-bisect
Date: Mon, 24 Jan 2011 12:04:01 -0800 [thread overview]
Message-ID: <7v8vyam5la.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4D3D5CE5.4050108@intel.com> (Shuang He's message of "Mon\, 24 Jan 2011 19\:05\:09 +0800")
Shuang He <shuang.he@intel.com> writes:
> If A is bad commit, and C fixed it, and then F is bad again,
>
> A -> B -> C -> D -> E -> F -> G -> H (master)
> \ \ /
> a -> b... c -> d -> e->f (feature 1)
>
> Start with H as bad commit, and D as good commit, it's possible git-bisect would jump to c, and it will lead to wrong direction
>
> If bad-branch-first is used, it would be:
> 1. first round found F
> 2. end
It is unclear from the way you drew the picture if "F" is supposed to be a
merge of "E" and "f", but I'd assume that it is.
So what you are saying in 1. is "skip from H until you hit a first merge
(without testing any intermediate commit), find F and stop to check it,
and find that it is broken".
What makes you decide "2. end"? The fact that both of its parents "E" and
"f" are Ok? IOW, it won't be "2. end" if one of the parents of the merge
is broken?
What if there is _no_ merge from a side branch but there were breakages in
A (fixed in C) and then F in your original picture, i.e.
A---B---C---D---E---F---G---H (broken)
x o x
and you are hunting for the bug starting from H? How does your algorithm
help? I grossed over the linear part by saying "skip from H until you hit
a first merge", but in general, what is your plan to handle linear part of
the history?
A totally unacceptable answer is "It does not help linear case, but it
helps when there are merges". The a-thru-f side branch in your picture,
or any "culprit side branch that was merged" your algorithm finds in
general, would eventually have a linear segment, and having x-o-x in the
history fundmentally breaks "bisect"---your band-aid will not help.
The whole idea behind using "bisect" to gain efficiency in isolating the
issue depends on "Once you see a Good commit, you do not have to search
beyond its ancestors", as it is to look for a single breakage that
persists to the "Bad" commit you give, and as far as "bisect" is
concerned, the breakage at A in your example is an unrelated breakage that
did not persist through the history to the "Bad" commit H.
next prev parent reply other threads:[~2011-01-24 20:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 2:03 [RFC] Add bad-branch-first option for git-bisect Shuang He
2011-01-24 2:05 ` [PATCH] add config option core.bisectbadbranchfirst Shuang He
2011-01-24 9:53 ` [RFC] Add bad-branch-first option for git-bisect Christian Couder
2011-01-24 10:30 ` Shuang He
2011-01-24 10:50 ` Johannes Sixt
2011-01-24 11:05 ` Shuang He
2011-01-24 20:04 ` Junio C Hamano [this message]
2011-01-25 3:27 ` Shuang He
2011-01-25 9:20 ` Christian Couder
2011-01-26 7:22 ` Shuang He
2011-01-26 9:44 ` Christian Couder
2011-01-26 10:40 ` Shuang He
2011-01-24 20:28 ` Avery Pennarun
2011-01-26 7:11 ` Shuang He
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=7v8vyam5la.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=apenwarr@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=shuang.he@intel.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;
as well as URLs for NNTP newsgroup(s).