Re: [PATCH v6 06/12] doc: revisions: single vs multi-parent notation comparison
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 26, 2016, 16:19 UTC
- Message-ID
- <xmqqwpj3ijtd.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <6b37851f-0f2f-0379-c10e-52f7da6b7110@gmail.com>
Jakub Narębski <jnareb@gmail.com> writes:
Show 8 quoted lines
> W dniu 13.08.2016 o 01:45, Philip Oakley pisze:
>
>> +'HEAD{caret}2{caret}@', however you cannot say 'HEAD{caret}@{caret}2'.
>
> Though I do wonder if it is implementation limitation, or if it is something
> inherent in the notation, namely that <rev>^@ and <rev>^! resolve (the former
> at least in general, though not for every <rev>) to more than one revision
> specifier.I think that the answer you are giving to the question is the latter, and I tend to agree with you.
You could define: A^@ followed by <anything> means first expand A^@, and then apply that <anything> to each and every one in the resulting set. But some may be merges and while others not. It is unclear what should happen to A^@^2 when one of A's parents has only one parent. In some use cases, it would be convenient if parents of A to which the <anything> operation cannot be applied, but in other use cases, it would be convenient if the whole thing caused an error. The notation is not detailed/rich enough to express the distinction.