]> git.ipfire.org Git - thirdparty/git.git/blobdiff - wildmatch.c
wildmatch: change behavior of "foo**bar" in WM_PATHNAME mode
[thirdparty/git.git] / wildmatch.c
index d074c1be1046f1aba11d21eb5b66a738590bc712..9e9e2a2f955d242cf994c5451c537a7f88539379 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;