Subject: Re: Specifying revisions in the future

From: Jakub Narebski <[email-masked]>
Date: Sun, 05 Feb 2012 13:57:55 -0800 (PST)

Andreas Schwab <[email-masked]> writes:
> Matthieu Moy <[email-masked]> 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?  Commit objects have
pointers in one direction only, from commit to its ancestors (earlier
commits).

Second, `--first-parent' won't help here.  Take for example the
following situation:

   ---X<---*<---.<---A
            \
             \--.<---B

X+3 is A or B?  Note that pointers point _to_ '*' commit, so there is
not first or second here - no natural ordering like in the case of
commit parents.

-- 
Jakub Narebski