Re: [PATCH] Add new @ shortcut for HEAD
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Apr 30, 2013, 20:37 UTC
- Message-ID
- <CALkWK0k9Gix4_x-VKry2a-hZL-j0ROGGLiiYV9NyE+1A-VxQOA@mail.gmail.com>
- In-Reply-To
- <7v4nendbry.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 6 quoted lines
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> In other words: the sequence "@" is short for "HEAD".
>
> That is saying a very different thing. master@{4.days} is not short
> for masterHEAD{4.days}.I meant after ^, ~, @{} have been peeled off. Just before resolving what's left.
Show 5 quoted lines
> As design and semantics look still fuzzy (the primary one I am not > sure about is if @ is a ref or just a revision), even though the > desire to have _something_ seem to be popular, I am not particulary > interested in looking at an alternative patch. I want to see the > right semantics first.
I wanted to explain it through an implementation, but okay. In your proposal, @ is a special ref: it behaves like a ref in a rev spec, but cannot be update-ref'ed or symbolic-ref'ed. This is probably the best we can do, unless we want to emulate a full ref (I'm not sure how useful the .git/@ override will even be).