summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-09-28 05:47:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-28 05:47:52 (GMT)
commita515136c523cca1d4c5ea2b3c46b3f26bbd22639 (patch)
tree1b10df0b1a21ea0164040b5ff7c47a9fb979a8ad /builtin
parent7451fcdc0d3cffdb9aa79d2651830b44a8e052d6 (diff)
parentda769d2986470931b8e80b8d14afcae3d7cc20d7 (diff)
downloadgit-a515136c523cca1d4c5ea2b3c46b3f26bbd22639.zip
git-a515136c523cca1d4c5ea2b3c46b3f26bbd22639.tar.gz
git-a515136c523cca1d4c5ea2b3c46b3f26bbd22639.tar.bz2
Merge branch 'jk/describe-omit-some-refs'
"git describe --match" learned to take multiple patterns in v2.13 series, but the feature ignored the patterns after the first one and did not work at all. This has been fixed. * jk/describe-omit-some-refs: describe: fix matching to actually match all patterns
Diffstat (limited to 'builtin')
-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? */