git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: should "git bisect" support "git bisect next?"

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 13, 2017, 01:40 UTC
Message-ID
<xmqqpo8narc3.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171112184252.vpasjhfkt63izrun@thunk.org>
Theodore Ts'o <tytso@mit.edu> writes:
Show 21 quoted lines
> On Sun, Nov 12, 2017 at 03:21:57PM +0100, Christian Couder wrote:
>> 
>> Yeah I agree that it might be something interesting for the user to do.
>> But in this case the sequence in which you give the good and the bad
>> commits is not important.
>> Only the last bad commit and the set of good commits that were given
>> are important.
>
> Is it really true that of the bad commits, only the last one is significant?
>
> Suppose we have a git tree that looks like this:
>
>           *---*---*---*---*---*---M2---*---B1
>           |                        |
>   G1--*--D1---*---*---*---B2-\     |
>           |                   \    /
>           *---*---*---B3--*---M1--/
>
> If we know that commits B2 and B3 are bad, if we assume that all
> commits before the "bad" commit are good, all commits after the "bad"
> commit are bad, can we not deduce that commit D1 should also be "bad"?

You are correct. Christian fell into an understandable and common confusion. It is true that we only maintain one significant bad (i.e. the breakage that is known-ealiest so far), but that oldest bad is the result of the bisection taking into account all the 'bad' we have got in sequence so far, not necessarily the same as, and hopefully way better than, the last bad the user gave from the command line. In your topology, "git bisect log" would contain "bad B1", "bad B2", and "bad B3", and when the earlier session that produced that log saw these three bad commits, it would have marked D1 as the known-earliest bad one.

Taking the last-given bad B3 is suboptimal than that.
Previous: Theodore Ts'oNext: Robert P. J. Day
Message 8 of 11 in “should "git bisect" support "git bisect next?"”
  1. Robert P. J. DayNov 11, 2017
  2. Christian CouderNov 11, 2017
  3. Junio C HamanoNov 11, 2017
  4. Theodore Ts'oNov 11, 2017
  5. Junio C HamanoNov 12, 2017
  6. Christian CouderNov 12, 2017
  7. Theodore Ts'oNov 12, 2017
  8. Junio C HamanoNov 13, 2017
  9. Robert P. J. DayNov 12, 2017
  10. Junio C HamanoNov 12, 2017
  11. Stephan BeyerNov 12, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.