summaryrefslogtreecommitdiff
path: root/t/t6120-describe.sh
diff options
context:
space:
mode:
authorMax Kirillov <max@max630.net>2017-09-16 05:53:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-17 01:21:12 (GMT)
commitda769d2986470931b8e80b8d14afcae3d7cc20d7 (patch)
treedcf2d3d34e7067b2b3f1774abdfe4355efd16f50 /t/t6120-describe.sh
parent77d21f29eaddb1fbe82e013ea42d4e0180bbdda2 (diff)
downloadgit-da769d2986470931b8e80b8d14afcae3d7cc20d7.zip
git-da769d2986470931b8e80b8d14afcae3d7cc20d7.tar.gz
git-da769d2986470931b8e80b8d14afcae3d7cc20d7.tar.bz2
describe: fix matching to actually match all patterns
`git describe --match` with multiple patterns matches only first pattern. If it fails, next patterns are not tried. Fix it, add test cases and update existing test which has wrong expectation. Signed-off-by: Max Kirillov <max@max630.net> 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, 5 insertions, 1 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 167491f..38570f6 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -182,10 +182,14 @@ check_describe "test2-lightweight-*" --tags --match="test2-*"
check_describe "test2-lightweight-*" --long --tags --match="test2-*" HEAD^
-check_describe "test1-lightweight-*" --long --tags --match="test1-*" --match="test2-*" HEAD^
+check_describe "test2-lightweight-*" --long --tags --match="test1-*" --match="test2-*" HEAD^
check_describe "test2-lightweight-*" --long --tags --match="test1-*" --no-match --match="test2-*" HEAD^
+check_describe "test1-lightweight-*" --long --tags --match="test1-*" --match="test3-*" HEAD
+
+check_describe "test1-lightweight-*" --long --tags --match="test3-*" --match="test1-*" HEAD
+
test_expect_success 'name-rev with exact tags' '
echo A >expect &&
tag_object=$(git rev-parse refs/tags/A) &&