From: Felipe Contreras Date: Mon, 29 Apr 2013 23:10:13 GMT Subject: Re: [PATCH] Add new @ shortcut for HEAD Message-ID: In-Reply-To: <7vobcxey3g.fsf@alter.siamese.dyndns.org> On Mon, Apr 29, 2013 at 6:06 PM, Junio C Hamano wrote: > --- a/t/t1503-rev-parse-verify.sh > +++ b/t/t1503-rev-parse-verify.sh > @@ -115,13 +115,18 @@ test_expect_success 'master@{n} for various n' ' > test_must_fail git rev-parse --verify master@{$Np1} > ' > > -test_expect_success 'empty @' ' > +test_expect_success 'empty @ and ref@ without trailing {stuff}' ' > + test_when_finished "git branch -d twoago" && > + git branch twoago HEAD~2 && > rev_hash=$(git rev-parse --verify @) && > test "$rev_hash" = "$HASH4" && > rev_hash=$(git rev-parse --verify HEAD@) && > test "$rev_hash" = "$HASH4" && > rev_hash=$(git rev-parse --verify master@) && > - test "$rev_hash" = "$HASH4" > + test "$rev_hash" = "$HASH4" && > + rev_hash=$(git rev-parse --verify twoago@) && > + test "$rev_hash" = "$HASH2" && > + test_must_fail git rev-parse --verify nosuch@ > ' Sure, but none of the tests above do that. Up to you. -- Felipe Contreras