From: Ramkumar Ramachandra Date: Thu, 02 May 2013 13:39:31 GMT Subject: [PATCH 6/9] t1508 (at-combinations): test with symbolic refs Message-ID: <1367501974-6879-7-git-send-email-artagnon@gmail.com> In-Reply-To: <1367501974-6879-1-git-send-email-artagnon@gmail.com> Symbolic refs don't work with @{u}. Document this failure. Also create a symbolic-ref @ (which is a valid ref name), and test everything with it to make sure that there is no bug in the @-parser. Signed-off-by: Ramkumar Ramachandra --- t/t1508-at-combinations.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh index 29ffd73..bb86c79 100755 --- a/t/t1508-at-combinations.sh +++ b/t/t1508-at-combinations.sh @@ -59,6 +59,19 @@ nonsense "@{1}@{u}" nonsense "HEAD@{-1}" nonsense "@{-1}@{-1}" +# Symbolic refs +git symbolic-ref H HEAD +check "H@{1}" commit new-one +check "H@{now}" commit new-two +check "H@{u}" ref refs/heads/upstream-branch failure + +# To make sure that the @-parser isn't buggy, check things with the +# symbolic-ref @ +git symbolic-ref @ HEAD +check "@@{1}" commit new-one +check "@@{now}" commit new-two +check "@@{u}" ref refs/heads/upstream-branch failure + # Document differences between @{N} and HEAD@{N}. The former resolves # HEAD to a branch and looks up the logs for that branch, while the # latter looks for the logs of HEAD. -- 1.8.3.rc0.40.g09a0447