summaryrefslogtreecommitdiff
path: root/t/t7004-tag.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-06-20 16:59:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-06-20 20:00:54 (GMT)
commit588d0e834b244565863fa80e6c48c20e0db9b62f (patch)
treeb3e36bafc4e34d0e826a62ddfe1d26f7f4626df7 /t/t7004-tag.sh
parentdaab4eeafa0dc620d67ccb57c28e08f6f8b3868c (diff)
downloadgit-588d0e834b244565863fa80e6c48c20e0db9b62f.zip
git-588d0e834b244565863fa80e6c48c20e0db9b62f.tar.gz
git-588d0e834b244565863fa80e6c48c20e0db9b62f.tar.bz2
tag: accept multiple patterns for --list
Until now, "git tag -l foo* bar*" would silently ignore the second argument, showing only refs starting with "foo". It's not just unfriendly not to take a second pattern; we actually generated subtly wrong results (from the user's perspective) because some of the requested tags were omitted. This patch allows an arbitrary number of patterns on the command line; if any of them matches, the ref is shown. While we're tweaking the documentation, let's also make it clear that the pattern is fnmatch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7004-tag.sh')
-rwxr-xr-xt/t7004-tag.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 2ac1c66..097ce2b 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -257,6 +257,11 @@ test_expect_success \
test_cmp expect actual
'
+test_expect_success 'tag -l can accept multiple patterns' '
+ git tag -l "v1*" "v0*" >actual &&
+ test_cmp expect actual
+'
+
# creating and verifying lightweight tags:
test_expect_success \