Re: Specifying revisions in the future

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narebski <jnareb@xxxxxxxxx> writes:

> Andreas Schwab <schwab@xxxxxxxxxxxxxx> writes:
>> Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> 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).

> 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.

Andreas.

-- 
Andreas Schwab, schwab@xxxxxxxxxxxxxx
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]