OSDN Git Service

Merge branch 'jk/describe-omit-some-refs'
authorJunio C Hamano <gitster@pobox.com>
Thu, 28 Sep 2017 05:47:52 +0000 (14:47 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Sep 2017 05:47:52 +0000 (14:47 +0900)
"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

1  2 
builtin/describe.c
t/t6120-describe.sh

@@@ -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? */
Simple merge