git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Hagen Paul Pfeifer <hagen@jauu.net>, git@vger.kernel.org
Subject: Re: Bisect limited to Merge Commits
Date: Wed, 27 Apr 2016 15:25:36 -0700	[thread overview]
Message-ID: <xmqqk2ji7kpr.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <57213041.5070506@kdbg.org> (Johannes Sixt's message of "Wed, 27 Apr 2016 23:33:53 +0200")

Johannes Sixt <j6t@kdbg.org> writes:

> Am 27.04.2016 um 22:56 schrieb Junio C Hamano:
>> So being able to stop at only commits on the first-parent chain is a
>> valid and useful tool.  "git bisect --first-parent" is one of the
>> things that are sometimes asked for.
>
> With origin pointing to git.git, I attempted this:
>
>  git bisect start
>  git rev-list --first-parent --boundary origin..origin/pu |
>    sed -ne s/-//p | xargs git bisect good
>  git bisect bad origin/pu
>
> and it starts bisecting among the 50-something first-parent commits
> between origin and origin/pu.

That is a cute idea but I wonder if it would work well in a history
full of pointless no-ff merges.

Here is a sample topology (output from "git log --oneline --graph")

    *   84ef1bb pointless
    |\  
    | * 4ae9f68 third
    |/  
    *   aec8732 pointless
    |\  
    | * fd4ed0d second
    |/  
    * 696b5c1 initial

where the tip of 'master' was initial, a side branch built 'second'
on it and then 'master' made a no-ff 'pointless' merge, another side
branch built 'third' on it and then 'master' again made a no-ff
'pointless' merge.

    $ git rev-list --first-parent --boundary initial..pointless

would give us 'third' and 'second' as boundaries, but by marking
'third' as GOOD, we declare to 'bisect' machinery that it and all of
its ancestors are GOOD.  So upon seeing 'bisect bad HEAD', we would
immediately see that HEAD is the first bad commit, wouldn't we?

Actually, "pointless no-ff merges" is a red herring.  Any history
with side branch that branched from the first-parent chain after the
commit at the bottom of the bisection range (in this example, the
side branch that built 'third' was forked off of the first 'pointless'
commit on the first-parent chain of 'master', which was made after
the bottom of the range 'initial') would have the same problem, I
would imagine.

  reply	other threads:[~2016-04-27 22:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 20:45 Bisect limited to Merge Commits Hagen Paul Pfeifer
2016-04-27 20:56 ` Junio C Hamano
2016-04-27 21:33   ` Johannes Sixt
2016-04-27 22:25     ` Junio C Hamano [this message]
2016-04-28  6:19     ` Hagen Paul Pfeifer
2016-04-28  6:44       ` Jacob Keller

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=xmqqk2ji7kpr.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hagen@jauu.net \
    --cc=j6t@kdbg.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.
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).