From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Michael Haggerty <mhagger@alum.mit.edu>,
Jeff King <peff@peff.net>,
git@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] bisect: error out when given any good rev that is not an ancestor of the bad rev
Date: Mon, 30 Jun 2008 16:27:27 -0700 [thread overview]
Message-ID: <7vtzfatsf4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200807010116.30214.chriscool@tuxfamily.org> (Christian Couder's message of "Tue, 1 Jul 2008 01:16:30 +0200")
Christian Couder <chriscool@tuxfamily.org> writes:
> Yes, I assume C is also bad.
>
>> ... which means you are dealing with *two* breakages. That's outside
>> what bisect deals with.
>
> Sorry, I don't understand why I am assuming 2 breakages.
Your topology is
>> > A-B-C-D
>> > \E-F
and you start with "D F" so D is bad and F is good, right?
bisect operates on a history with a single breakage that separates older
good ones and newer bad ones.
Now D is bad, so there must be somewhere in
A--B--C--D
that broke D. It could be D itself, or it may have been broken at A
already.
But if A or B were bad, then, because F is good, this part of the picture:
A--B--E--F
does not deal with "old good followed by new bad sparated by a single
breakage point". Maybe E or F have fixed it, but then before that is bad
and after that is good. That's not what bisect deals with.
Going back to the original picture, then:
>> > A-B-C-D
>> > \E-F
For F to be good, all of its ancestors are by definition good (that is the
basic assumption of bisection). A and B are good. If D is broken, C or D
must be broken.
So we do not decend into B nor its ancestor.
The logic is the same if the history is linear.
A--B--C--D--E--F
If B is good and F is bad, and if you check D and find out that D is still
good, then we can ignore everything behind D, and that is what lets us
limit the search space and suspect only E or F. This is exactly the same
"Everything that leads to a good one is good" principle upon which
bisection works.
next prev parent reply other threads:[~2008-06-30 23:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 22:42 [PATCH] bisect: error out when given any good rev that is not an ancestor of the bad rev Christian Couder
2008-06-30 22:44 ` Junio C Hamano
2008-06-30 22:48 ` Junio C Hamano
2008-06-30 23:16 ` Christian Couder
2008-06-30 23:27 ` Junio C Hamano [this message]
2008-06-30 23:32 ` Junio C Hamano
2008-06-30 23:42 ` Junio C Hamano
2008-06-30 23:46 ` Christian Couder
2008-06-30 23:52 ` Junio C Hamano
2008-07-01 0:20 ` Christian Couder
2008-07-01 1:13 ` 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=7vtzfatsf4.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
--cc=peff@peff.net \
--cc=torvalds@linux-foundation.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).