Imported Upstream version 2.29.1
[platform/upstream/git.git] / wildmatch.c
index 57c8765..9e9e2a2 100644 (file)
@@ -104,8 +104,8 @@ static int dowild(const uchar *p, const uchar *text, unsigned int flags)
                                            dowild(p + 1, text, flags) == WM_MATCH)
                                                return WM_MATCH;
                                        match_slash = 1;
-                               } else
-                                       return WM_ABORT_MALFORMED;
+                               } else /* WM_PATHNAME is set */
+                                       match_slash = 0;
                        } else
                                /* without WM_PATHNAME, '*' == '**' */
                                match_slash = flags & WM_PATHNAME ? 0 : 1;
@@ -272,8 +272,7 @@ static int dowild(const uchar *p, const uchar *text, unsigned int flags)
 }
 
 /* Match the "pattern" against the "text" string. */
-int wildmatch(const char *pattern, const char *text,
-             unsigned int flags, struct wildopts *wo)
+int wildmatch(const char *pattern, const char *text, unsigned int flags)
 {
        return dowild((const uchar*)pattern, (const uchar*)text, flags);
 }