From: Junio C Hamano Date: Thu, 28 Sep 2017 05:47:52 +0000 (+0900) Subject: Merge branch 'jk/describe-omit-some-refs' X-Git-Tag: v2.15.0-rc0~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a515136c523cca1d4c5ea2b3c46b3f26bbd22639;p=thirdparty%2Fgit.git 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 --- a515136c523cca1d4c5ea2b3c46b3f26bbd22639 diff --cc builtin/describe.c index e77163e909,ba4ebb4d1b..3dc1836480 --- a/builtin/describe.c +++ b/builtin/describe.c @@@ -164,12 -158,14 +165,14 @@@ static int get_name(const char *path, c return 0; for_each_string_list_item(item, &patterns) { - if (!wildmatch(item->string, path + 10, 0)) - if (!wildmatch(item->string, path + 10, 0, NULL)) { ++ if (!wildmatch(item->string, path + 10, 0)) { + found = 1; break; + } + } - /* If we get here, no pattern matched. */ + if (!found) return 0; - } } /* Is it annotated? */