Re: [PATCH] Add new @ shortcut for HEAD
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 30, 2013, 06:11 UTC
- Message-ID
- <CAMP44s3zWLnXeBH2CsjDU=jXLAXMcMDSJgW9Qin=jKJrfO_2gQ@mail.gmail.com>
- In-Reply-To
- <CACsJy8Af5Z6DzsAchu2MpMeanTEJiF-DwhdPMGE9n6QKf2K6Eg@mail.gmail.com>
On Tue, Apr 30, 2013 at 1:07 AM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 13 quoted lines
> On Tue, Apr 30, 2013 at 2:35 AM, Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
>> So HEAD@{0}~0^0 is too much to type, but we can remove '^0', and we can
>> remove '~0', and we can remove 'HEAD', but we can't remove '{0}'?
>>
>> This patch allows 'HEAD@' to be the same as 'HEAD@{0}', and similarly with
>> 'master@'.
>>
>> So we can type '@' instead of 'HEAD@', or rather 'HEAD'. So now we can
>> use 'git show @~1', and all that goody goodness.
>
> This patch also allows funny things like @{-1}@ (wanted to try the
> cute syntax @{u}@ but too lazy to setup upstream)Yeah, I thought about that, and I thought it was harmless. Specially considering that doing anything else would be less elegant code-wise.
Cheers.
-- Felipe Contreras