Re: [PATCH] Add new @ shortcut for HEAD
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 30, 2013, 17:54 UTC
- Message-ID
- <7v8v3zewfi.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130430005304.GG24467@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 12 quoted lines
> Junio C Hamano wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>>> Never-mind, now I see the difference, still, I don't think it's
>>> relevant for this patch.
>>
>> I don't either. With the precedence of @{u}, @ does not need to have
>> anything to do with a reflog. It is just a random letter that casts
>> a magic spell.
>
> I thought the convention was "^{...} is for operators that act on
> objects, @{...} for operators that act on refs or symrefs".Almost. You can ask "git rev-parse --symbolic-full-name" to see that @{-1} is still a ref, but @{1} is _not_ a ref (it is a concrete revision that you cannot run 'update-ref' on).