tests: at-combinations: @{N} versus HEAD@{N}
[gitweb.git] / t / t1508-at-combinations.sh
index 31e95a5466b4efd7c468f32a66c20ee20bb3c9e6..e5aea3b89602fdaf5ed3a9a230a604dd3f48cda0 100755 (executable)
@@ -61,4 +61,17 @@ nonsense "@{1}@{u}"
 nonsense "HEAD@{-1}"
 nonsense "@{-1}@{-1}"
 
+# @{N} versus HEAD@{N}
+
+check "HEAD@{3}" commit old-two
+nonsense "@{3}"
+
+test_expect_success 'switch to old-branch' '
+       git checkout old-branch
+'
+
+check HEAD ref refs/heads/old-branch
+check "HEAD@{1}" commit new-two
+check "@{1}" commit old-one
+
 test_done