From: Junio C Hamano <gitster@pobox.com>
To: "Philip Oakley" <philipoakley@iee.org>
Cc: "Git List" <git@vger.kernel.org>
Subject: Re: Are --first-parent and --ancestry-path compatible rev-list options?
Date: Fri, 26 Aug 2016 15:53:18 -0700 [thread overview]
Message-ID: <xmqqfuprdtwh.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <2FA1998250474E76A386B82AD635E56A@PhilipOakley> (Philip Oakley's message of "Fri, 26 Aug 2016 22:23:46 +0100")
"Philip Oakley" <philipoakley@iee.org> writes:
> The commit graph. We are looking for F based on knowing J.
>
> . A - B - C - D -- E -- F -- G - H <-first parent, --merges (C,F,H)
> . \ | / \ / /
> . ----Z | / /
> . | | | /
> . \ \ / /
> . I -[J]- K - L - M <-since J, children of J
> . \ /
> . N - O - P
I think these two operations are fundamentally incompatible.
Because the first-parent traversal is what the name says, i.e.,
forbids the positive side of revision traversal to stray into side
branches, the positive side of a traversal that begins at H will not
see M, L and K. The negative side would traverse in the normal way
to paint commits starting J and its ancestors as UNINTERESTING, so
the traversal over the artificial "first-parent only" history, i.e.
H, G, F, E, D, C, B, A would eventually stop before showing an
ancestor of J.
On the other hand, to compute the ancestry-path, you need to make a
full traversal of the real history to find a subgraph J..H and then
post-process it to cull paths that do not contain J.
next prev parent reply other threads:[~2016-08-26 22:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-26 21:23 Are --first-parent and --ancestry-path compatible rev-list options? Philip Oakley
2016-08-26 22:53 ` Junio C Hamano [this message]
2016-08-27 11:04 ` Philip Oakley
2016-09-01 17:32 ` Junio C Hamano
2016-09-01 20:48 ` Philip Oakley
2016-09-01 22:20 ` Junio C Hamano
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=xmqqfuprdtwh.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=philipoakley@iee.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