summaryrefslogtreecommitdiff
path: root/builtin/describe.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-09-20 04:30:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-20 04:30:01 (GMT)
commit3445c3dd723b222d5ceda07b13d092d73428012e (patch)
treeefdf48b07bd250e14265b17e0a58e2bd911a56e5 /builtin/describe.c
parent9ddaf86b06a8078420f59aec8cab6daa93cf1a91 (diff)
parentda769d2986470931b8e80b8d14afcae3d7cc20d7 (diff)
downloadgit-3445c3dd723b222d5ceda07b13d092d73428012e.zip
git-3445c3dd723b222d5ceda07b13d092d73428012e.tar.gz
git-3445c3dd723b222d5ceda07b13d092d73428012e.tar.bz2
Merge branch 'jk/describe-omit-some-refs' into mk/describe-match-with-all
* jk/describe-omit-some-refs: describe: fix matching to actually match all patterns
Diffstat (limited to 'builtin/describe.c')
-rw-r--r--builtin/describe.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index e77163e..3dc1836 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -158,18 +158,21 @@ static int get_name(const char *path, const struct object_id *oid, int flag, voi
* pattern.
*/
if (patterns.nr) {
+ int found = 0;
struct string_list_item *item;
if (!is_tag)
return 0;
for_each_string_list_item(item, &patterns) {
- if (!wildmatch(item->string, path + 10, 0))
+ if (!wildmatch(item->string, path + 10, 0)) {
+ found = 1;
break;
+ }
+ }
- /* If we get here, no pattern matched. */
+ if (!found)
return 0;
- }
}
/* Is it annotated? */