[PATCH 1/5] t1508 (at-combinations): more tests; document failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To emphasize what we're testing in @{1}@{u}, document that @{0}@{0} is
also nonsense.  This makes it clear that @{<n>} does not resolve to a
ref whose upstream we can determine with @{u}/ reflog we can dig with
@{0}.

Since HEAD is implicit in @{}, check that HEAD@{} works fine for these
cases.  It doesn't make sense in @{-<n>} because @{-<n>} cannot be
used with anything other than HEAD, and interpret_nth_prior_checkout()
hard-codes "HEAD".

Additionally, document bugs in the @-parser by symbolic-ref'ing @ to
HEAD and re-running some tests.

Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
---
 t/t1508-at-combinations.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh
index d5d6244..efa2a2a 100755
--- a/t/t1508-at-combinations.sh
+++ b/t/t1508-at-combinations.sh
@@ -39,13 +39,27 @@ test_expect_success 'setup' '
 
 check HEAD new-two
 check "@{1}" new-one
+check "HEAD@{1}" new-one
+check "@{now}" new-two
+check "HEAD@{now}" new-two
 check "@{-1}" old-two
 check "@{-1}@{1}" old-one
 check "@{u}" upstream-two
+check "HEAD@{u}" upstream-two
 check "@{u}@{1}" upstream-one
 check "@{-1}@{u}" master-two
 check "@{-1}@{u}@{1}" master-one
 nonsense "@{u}@{-1}"
+nonsense "@{0}@{0}"
 nonsense "@{1}@{u}"
+nonsense "HEAD@{-1}"
+
+# Make sure that the @-parser isn't buggy; check things with
+# symbolic-ref @ pointing to HEAD.
+git symbolic-ref @ HEAD
+check "@@{1}" new-one
+check "@@{now}" new-two
+check "@@{u}" upstream-two failure
+nonsense "@@{-1}"
 
 test_done
-- 
1.8.3.rc0.24.g6456091

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]