From da769d2986470931b8e80b8d14afcae3d7cc20d7 Mon Sep 17 00:00:00 2001 From: Max Kirillov Date: Sat, 16 Sep 2017 08:53:44 +0300 Subject: 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 Signed-off-by: Junio C Hamano --- t/t6120-describe.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index 167491fd5b..38570f63bb 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) && -- cgit v1.2.3