From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Christian Couder <chriscool@tuxfamily.org>, git@vger.kernel.org
Subject: Re: [PATCH 1/2] rev-list: implement --bisect-all
Date: Tue, 23 Oct 2007 14:33:15 -0700 [thread overview]
Message-ID: <7vabq97bz8.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0710080607180.4174@racer.site> (Johannes Schindelin's message of "Mon, 8 Oct 2007 06:08:58 +0100 (BST)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Mon, 8 Oct 2007, Christian Couder wrote:
>
>> but I am not sure that the "dunno" logic should be the first part of it
>> to be done in C.
>
> The thing is, git-bisect is porcelain-ish. And by having a lot of the
> functionality there, which is not really porcelain, but plumbing, you
> prevent other porcelains, such as git-gui or qgit, from using that
> function.
>
> Which is bad.
Still, it is good to prototype in the script while figuring out
what the desired behaviour is, I would say.
What I was hoping to see when I posted --bisect-all suggestion
was a bit different from what Christian did, by the way.
In addition to the bisect/skip-* that are filtered at the shell
level, if you feed the list of commits that cannot be tested to
the bisection plumbing, you can affect the way the resulting
list from the --bisect-all is sorted.
Suppose you have this (B is bad, G is good):
o---.........---o---Y---o---o---B
/ /
G---o---.........---o---Z---X
and one round of bisection picked X. You find it untestable,
and Y and Z both bisects the remaining set equally well. In
such a case, the current code sorts the resulting set, with Y
and Z next to each other (because they are both closest to the
midway), and the Porcelain filters out X which is better than Y
or Z. You may end up picking Z.
Often, when X is not testable, neither is Z. We would be better
off to avoid checking a commit close to what are known to be
untestable while there are other commits that are equally close
to the midway.
So instead of sorting the list solely based on the mid-ness like
the current code does (i.e. compare_commit_dist()), we can tweak
commits' mid-ness value (i.e. best_bisection_sorted() computes
it in distance variable) by penalizing it with the closeness of
the commit to known untestable commits.
Naively, "closeness" of commit Z to commit X can be defined as
something simple as "rev-list Z...X | wc -l". The smaller the
number, the closer the commits.
prev parent reply other threads:[~2007-10-23 21:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 3:34 [PATCH 1/2] rev-list: implement --bisect-all Christian Couder
2007-10-08 3:44 ` Johannes Schindelin
2007-10-08 5:08 ` Christian Couder
2007-10-08 5:08 ` Johannes Schindelin
2007-10-23 21:33 ` 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=7vabq97bz8.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=chriscool@tuxfamily.org \
--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).