Re: [PATCH] Add new @ shortcut for HEAD
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 29, 2013, 22:38 UTC
- Message-ID
- <7vwqrlezcs.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1367264106-2351-1-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 16 quoted lines
> diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh
> index 813cc1b..426c63f 100755
> --- a/t/t1503-rev-parse-verify.sh
> +++ b/t/t1503-rev-parse-verify.sh
> @@ -115,4 +115,13 @@ test_expect_success 'master@{n} for various n' '
> test_must_fail git rev-parse --verify master@{$Np1}
> '
>
> +test_expect_success 'empty @' '
> + 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"
> +'Don't we have different refs that resolve to something other than $HASH4 at this point in the test? Otherwise we wouldn't notice a breakage because we cannot tell if HEAD@ and master@ are interpreted correctly or all of these happen to yield $HASH4 because a version somebody else patches to break the implementation in this patch discards any string before @ that is not followed by {stuff}.