]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1401-symbolic-ref.sh
Merge branch 'jc/symbolic-ref-no-recurse'
[thirdparty/git.git] / t / t1401-symbolic-ref.sh
index 0c204089b83595bc516e9c26416cd67191d3c083..d708acdb819536083cc0f8bc5e41d2196d90aee3 100755 (executable)
@@ -175,4 +175,18 @@ test_expect_success 'symbolic-ref allows top-level target for non-HEAD' '
        test_cmp_rev top-level HEAD
 '
 
+test_expect_success 'symbolic-ref pointing at another' '
+       git update-ref refs/heads/maint-2.37 HEAD &&
+       git symbolic-ref refs/heads/maint refs/heads/maint-2.37 &&
+       git checkout maint &&
+
+       git symbolic-ref HEAD >actual &&
+       echo refs/heads/maint-2.37 >expect &&
+       test_cmp expect actual &&
+
+       git symbolic-ref --no-recurse HEAD >actual &&
+       echo refs/heads/maint >expect &&
+       test_cmp expect actual
+'
+
 test_done