Re: [PATCH] refs.c: interpret @ as HEAD
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 30, 2013, 22:00 UTC
- Message-ID
- <CAMP44s1LJg9kcBVMb8YxJDTEpKerJoN5td7276=JB7ZY6APpZw@mail.gmail.com>
- In-Reply-To
- <CALkWK0kcuaXTKbafmC72C3H+UZN6oeEY140T21LJUHveO=UBvA@mail.gmail.com>
On Tue, Apr 30, 2013 at 1:22 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 10 quoted lines
> Junio C Hamano wrote:
>> @{-1}@{0} does. That means @{0} is a revision and not a ref, but @{-1}
>> is.
>
> Right. I missed that.
>
>> '"@" given alone' has to be a ref if we want @@{5.minutes.ago} to
>> resolve.
>
> Yeah, I just realized that it's a bug in the @{u} implementation.I don't think so. You probably need to modify branch_get(), because it has a special case for "HEAD", and who knows if it's hard-coded in other places. It's not just the @{u} implementation.
If we do the magic at the rev-parsing phase, all these details become irrelevant.
FTR. @@{upstream} and @@{now} works just fine in v2 of my patch series.-- Felipe Contreras