blame: large-scale performance rewrite
[gitweb.git] / t / t6120-describe.sh
index 1d20854609e8f752b446d6657fcbec479220f937..c0e5b2a6275df2d92172327b2d629cc73720423e 100755 (executable)
@@ -186,4 +186,16 @@ test_expect_success 'name-rev with exact tags' '
        test_cmp expect actual
 '
 
+test_expect_success 'describe --contains with the exact tags' '
+       echo "A^0" >expect &&
+       tag_object=$(git rev-parse refs/tags/A) &&
+       git describe --contains $tag_object >actual &&
+       test_cmp expect actual &&
+
+       echo "A^0" >expect &&
+       tagged_commit=$(git rev-parse "refs/tags/A^0") &&
+       git describe --contains $tagged_commit >actual &&
+       test_cmp expect actual
+'
+
 test_done