From: "H. Peter Anvin" <hpa@zytor.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: The behaviour of git bisect skip
Date: Mon, 13 Oct 2008 16:42:35 -0700 [thread overview]
Message-ID: <48F3DCEB.1060803@zytor.com> (raw)
I recently had the unhappy experience of trying to bisect a tree with a
large region of the history obscured by auxilliary bugs. "git bisect
skip" will stay in the central region, thus being largely useless.
I was thinking about how to possibly do it better. This is something I
came up with, and thought it might be interesing.
a. we obviously cannot move the start and end (good and bad) markers,
since they have not been shown one way or the other.
b. however, the practice of testing the centermost point is merely the
*optimal*, corresponding to 1 bit of information per iteration. An
off-center test is also possible (as long as the value depends on both
endpoints, and isn't fixed from one of the endpoints; in that case we
have a linear search), corresponding to a smaller amount of information
- for example, sampling at the one-quarter point corresponds to
3/4*log2(3/4) + 1/4*log2(1/4) =~ 0.811 bits of information.
I would suggest something based on the following algorithm:
Given an interval with a certain number of skip points, subdivide the
interval into subintervals each separated by a skip point. Pick the
centermost point of the *largest* of these intervals. If there is more
than one largest interval, choose the one centermost point that ends up
being centermost in the overall interval.
This algorithm obviously needs some adjustment (as does plain binary
search) in order to deal with a branched history, but I thought it might
be an interesting starting point. It has the desirable property that it
can make forward progress even in the presence of skip points, and that
it avoids needlessly searching close to skip points.
-hpa
next reply other threads:[~2008-10-13 23:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 23:42 H. Peter Anvin [this message]
2008-10-15 6:54 ` The behaviour of git bisect skip Christian Couder
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=48F3DCEB.1060803@zytor.com \
--to=hpa@zytor.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).