git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Philip Oakley" <philipoakley@iee.org>
To: "Junio C Hamano" <gitster@pobox.com>,
	"Christian Couder" <christian.couder@gmail.com>
Cc: "Kevin Daudt" <me@ikke.info>, "git" <git@vger.kernel.org>,
	"Christian Couder" <chriscool@tuxfamily.org>
Subject: Re: [PATCH v4] rev-list: refuse --first-parent combined with --bisect
Date: Thu, 19 Mar 2015 23:51:42 -0000	[thread overview]
Message-ID: <3FAFDE160E204496A38A4B6C53FB9B32@PhilipOakley> (raw)
In-Reply-To: xmqqtwxjo4nf.fsf@gitster.dls.corp.google.com

From: "Junio C Hamano" <gitster@pobox.com>
Sent: Tuesday, March 17, 2015 6:33 PM
> Christian Couder <christian.couder@gmail.com> writes:
>
>> On Mon, Mar 16, 2015 at 10:05 PM, Junio C Hamano <gitster@pobox.com> 
>> wrote:
>>
>>> However, you can say "git bisect bad <rev>" (and "git bisect good
>>> <rev>" for that matter) on a rev that is unrelated to what the
>>> current bisection state is.  E.g. after you mark the child of 8 as
>>> "bad", the bisected graph would become
>>>
>>>    G...1---2---3---4---6---8---B
>>>
>>> and you would be offered to test somewhere in the middle, say, 4.
>>> But it is perfectly OK for you to respond with "git bisect bad 7",
>>> if you know 7 is bad.
>>>
>>> I _think_ the current code blindly overwrites the "bad" pointer,
>>> making the bisection state into this graph if you do so.
>>>
>>>    G...1---2---3---4
>>>                     \
>>>                      5---B
>>
>> Yes, we keep only one "bad" pointer.
>>
>>> This is very suboptimal.  The side branch 4-to-7 could be much
>>> longer than the original trunk 4-to-the-tip, in which case we would
>>> have made the suspect space _larger_, not smaller.
>>
>> Yes, but the user is supposed to not change the "bad" pointer for no
>> good reason.
>
> That is irrelevant, no?  Nobody is questioning that the user is
> supposed to judge if a commit is "good" or "bad" correctly.
[...]
>> and/or we could make "git bisect bad" accept any number of bad
>> commitishs.
>
> Yes, that is exactly what I meant.
>
> The way I understand the Philip's point is that the user may have
> a-priori knowledge that a breakage from the same cause appears in
> both tips of these branches.

Just to clarify; my initial query followed on from the way Junio had 
described it with having two tips which were known bad. I hadn't been 
aware of how the bisect worked on a DAG, so I wanted to fully understand 
Junio's comment regarding the expectation of a clean jump to commit 4 
(i.e. shouldn't we test commit 4 before assuming it's actually bad).  I 
was quite happy with a bisect of a linear list, but was unsure about how 
Git dissected DAGs.

I can easily see cases in more complicated product branching where users 
report intermittent operation for various product variants (especially 
if modular) and one wants to seek out those commits that introduced the 
behavious (which is typically some racy condition - otherwise it would 
be deterministic).

Given Junio's explantion with the two bad commits (on different legs) 
I'd sort of assumed it could be both user given, or algorithmically 
determined as part of the bisect.

> In such a case, we can start bisection
> after marking the merge-base of two 'bad' commits, e.g. 4 in the
> illustration in the message you are responding to, instead of
> including 5, 6, and 8 in the suspect set.
>
> You need to be careful, though.  An obvious pitfall is what you
> should do when there is a criss-cross merge.

You end up with possibly two (or more) merges being marked as the source 
of the bad behaviour, especially when racy ;-)

>
> Thanks.
> --

Hope that helps.
Philip

  parent reply	other threads:[~2015-03-19 23:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 14:19 [BUG] Segfault with rev-list --bisect Troy Moure
2015-03-04  5:33 ` Jeff King
2015-03-04 23:44 ` Junio C Hamano
2015-03-05  2:15   ` Troy Moure
2015-03-07 21:31   ` [PATCH] rev-list: refuse --first-parent combined with --bisect Kevin Daudt
2015-03-07 23:13     ` Kevin Daudt
2015-03-08  8:00       ` Junio C Hamano
2015-03-08 14:18     ` [PATCH v2] " Kevin Daudt
2015-03-08 15:02       ` [PATCH v3] " Kevin Daudt
2015-03-08 15:03       ` Kevin Daudt
2015-03-08 21:58         ` Eric Sunshine
2015-03-09 11:57           ` Kevin Daudt
2015-03-09 20:56         ` [PATCH v4] " Kevin Daudt
2015-03-10 22:09           ` Junio C Hamano
2015-03-10 22:55             ` Kevin Daudt
2015-03-10 23:12               ` Junio C Hamano
2015-03-11 18:45                 ` Kevin Daudt
2015-03-11 20:13                   ` Junio C Hamano
2015-03-16 16:33                     ` Kevin Daudt
2015-03-16 18:53                       ` Junio C Hamano
2015-03-16 20:25                         ` Philip Oakley
2015-03-16 21:05                           ` Junio C Hamano
2015-03-17 16:09                             ` Christian Couder
2015-03-17 18:33                               ` Junio C Hamano
2015-03-17 19:49                                 ` Christian Couder
2015-03-17 20:46                                   ` Junio C Hamano
2015-03-18 10:36                                     ` Christian Couder
2015-03-19 23:51                                 ` Philip Oakley [this message]
2015-03-20 13:02                         ` Scott Schmit
2015-03-19 22:14           ` [PATCH v5] " Kevin Daudt
2015-03-19 22:43             ` Junio C Hamano
2015-03-21 22:01               ` Kevin Daudt

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FAFDE160E204496A38A4B6C53FB9B32@PhilipOakley \
    --to=philipoakley@iee.org \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ikke.info \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).