From: Felipe Contreras Date: Tue, 30 Apr 2013 18:18:16 GMT Subject: Re: [PATCH] Add new @ shortcut for HEAD Message-ID: In-Reply-To: <20130430175635.GA1972@sigill.intra.peff.net> On Tue, Apr 30, 2013 at 12:56 PM, Jeff King wrote: > 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/@ > 89740333e8d398f1da701e9023675321bbb9a85b Right. I don't know why I expected it to show in 'git show-ref'. -- Felipe Contreras