Re: [PATCH] Add new @ shortcut for HEAD
On Tue, Apr 30, 2013 at 12:56 PM, Jeff King <peff@peff.net> wrote:
Show 23 quoted lines
> On Tue, Apr 30, 2013 at 12:47:57PM -0500, Felipe Contreras wrote:
>
>> > We should make sure that the code rejects "git update-ref @ foo"
>> > because that is "git update-ref @{0} ref", by the way. I didn't
>> > check with Felipe's patch.
>>
>> Hmm, with or without my patch 'git update @ foo' does nothing, same
>> with 'git update blah foo'. No error, no non-zero exit code, just
>> doesn't do anything.
>
> Are you sure?
>
> $ git version
> git version 1.8.2
>
> $ git update-ref @ foo
> fatal: foo: not a valid SHA1
>
> $ git update-ref @ origin/master
> $ echo $?
> 0
> $ cat .git/@
> 89740333e8d398f1da701e9023675321bbb9a85bRight. I don't know why I expected it to show in 'git show-ref'.
--
Felipe Contreras