From: Junio C Hamano <junkio@cox.net>
To: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Cc: git@vger.kernel.org
Subject: Re: bisect ends with a commit marked good and bad
Date: Wed, 15 Feb 2006 00:01:01 -0800 [thread overview]
Message-ID: <7vpslpm4oy.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <E1F9Gwm-0001Dy-3b@approximate.corpus.cam.ac.uk> (Sanjoy Mahajan's message of "Wed, 15 Feb 2006 02:19:32 -0500")
Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk> writes:
> How would I use gitk to show the those three good and three bad commits,
> and their spanning tree? Neither the man entry nor the examples of its
> use in git-bisect taught me enough to use it properly.
The way bisect narrows down bug hunting is to find a single
regression. IOW, the only question you can ask bisect is "this
older one was known to be good, but somehow this new one is bad.
If it was caused by one bug introduced somewhere during the
course of changes between the two, which one is it?"
So you always start by giving one good and one bad (or one bad
and one good, the order does not matter). That leaves * as
suspects.
o---o---O---*---*---*---*---X---o
\ /
*---*---*---*
O (good) X (bad)
Since it is finding a single regression, o commits are
irrelevant. commits after bad one X may have fixed the bug but
you are not interested in it. Commits before good one O might
have been broken in some other way, but we are looking for a
single regression, so they do not really matter either.
Then bisect suggests you one of (*) commits. Not at random, but
somewhere midway.
o---o---O---*---*---*---*---X---o
\ /
*---*---*---?
O (good) X (bad)
If ? is good, then three * suspects are good so you then have to
worry about remaining four * between the first O and X. That's
how you narrow things down.
You say a2d823bf is bad and 0f442aa2 is good. However, the
a2d823bf is a proper ancestor of 0f442aa2. That is, earlier it
was good but now it is good. As if you are trying to locate the
commit that fixed the bug. This is an impossible situation for
the bisect.
So your initial input may be truly good and bad commits, but
there might be more than one regression involved.
To look at the graph, you could do something like this:
for r in $good; do git tag good-$r $(git-rev-parse --verify $r); done
for r in $bad; do git tag bad-$r $(git-rev-parse --verify $r); done
gitk $(git-rev-parse $good) $(git-rev-parse --not $bad)
You will notice there is only one bad-* way below all the good-*
ones. Another possibility is maybe you have your good and bad
swapped?
prev parent reply other threads:[~2006-02-15 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-15 7:19 bisect ends with a commit marked good and bad Sanjoy Mahajan
2006-02-15 8:01 ` 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=7vpslpm4oy.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=sanjoy@mrao.cam.ac.uk \
/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).