From: Jakub Narebski <jnareb@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
jpaugh@gmx.us, git@vger.kernel.org
Subject: Re: Specifying revisions in the future
Date: Sun, 5 Feb 2012 23:24:59 +0100 [thread overview]
Message-ID: <201202052324.59941.jnareb@gmail.com> (raw)
In-Reply-To: <m2wr81vsdv.fsf@igel.home>
On Sun, 5 Feb 2012, Andreas Schwab wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>>>
>>>> "the successor of <commit>", OTOH, is not well defined, since there can
>>>> be several successors, and one can't order them reliably (you can't
>>>> really know the set of successors, because they can exist in different
>>>> repositories).
>>>
>>> Yet it would be nice to have a concise notation for "the nth successor
>>> of <commit> towards <commit>" (using --first-parent ordering when
>>> ambiguous).
>>
>> First, "the nth successor"... from which refs?
>
> From the first given commit towards the other given commit (the latter
> defaulting to HEAD).
That helps some, but not all situations, see below.
> > Second, `--first-parent' won't help here. Take for example the
> > following situation:
> >
> > ---X<---*<---.<---A
> > \
> > \--.<---B
> >
> > X+3 is A or B?
>
> If "towards A" then it is A, if "towards B", it is B. In other words,
> to get the "nth successor of C1 towards C2" take the leftmost possible
> parent when walking from C2 to C1, then walk back n commits along this
> path. This way you should have an unambigous definition.
Nope, still ambiguous:
---X<---*<---.<---A<---.<---M<---
\ /
\--.<---B<------/
Is X+3 A or B? Though '--first-parent + towards N' is I think unambiguous.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2012-02-05 22:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-04 15:58 Specifying revisions in the future jpaugh
2012-02-05 2:44 ` Jakub Narebski
[not found] ` <4F2DEF89.4030302@gmx.us>
2012-02-05 3:07 ` Jakub Narebski
2012-02-05 20:18 ` Matthieu Moy
2012-02-05 21:37 ` Andreas Schwab
2012-02-05 21:57 ` Jakub Narebski
2012-02-05 22:15 ` Andreas Schwab
2012-02-05 22:24 ` Jakub Narebski [this message]
2012-02-05 22:58 ` Andreas Schwab
2012-02-05 22:58 ` Philip Oakley
2012-02-05 23:08 ` Andreas Schwab
2012-02-06 4:28 ` Miles Bader
2012-02-07 21:25 ` Jonathan Paugh
2012-02-06 11:43 ` Matthieu Moy
2012-02-06 12:27 ` Andreas Schwab
2012-02-05 21:59 ` 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=201202052324.59941.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=jpaugh@gmx.us \
--cc=schwab@linux-m68k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.