summaryrefslogtreecommitdiff
path: root/t/t6120-describe.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-12-26 14:02:01 -0800
committerJunio C Hamano <gitster@pobox.com>2008-12-26 16:37:53 -0800
commit81dc223deba84341be9681d7a1a4a183e02e41d6 (patch)
treeb03ad00ce9253ccee3a2f6b58c495264a1321afb /t/t6120-describe.sh
parent4ed19a3c178d22fbd424af78b42b65533a8d1ebb (diff)
downloadgit-81dc223deba84341be9681d7a1a4a183e02e41d6.tar.gz
describe: Avoid unnecessary warning when using --all
In 212945d4 ("Teach git-describe to verify annotated tag names before output") git-describe learned how to output a warning if an annotated tag object was matched but its internal name doesn't match the local ref name. However, "git describe --all" causes the local ref name to be prefixed with "tags/", so we need to skip over this prefix before comparing the local ref name with the name recorded inside of the tag object. Patch-by: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6120-describe.sh')
-rwxr-xr-xt/t6120-describe.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index c6bfef5f47..113a085cb9 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -100,6 +100,12 @@ check_describe B --tags HEAD^^2^
check_describe B-0-* --long HEAD^^2^
check_describe A-3-* --long HEAD^^2
+: >err.expect
+check_describe A --all A^0
+test_expect_success 'no warning was displayed for A' '
+ test_cmp err.expect err.actual
+'
+
test_expect_success 'rename tag A to Q locally' '
mv .git/refs/tags/A .git/refs/tags/Q
'