wildmatch: rename constants and update prototype
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index ee8e7115a8a37ca5c096dc3548b13e3761e4cac5..175a1827ba90966bbaa19931ef6e193762d4c7c6 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -8,6 +8,7 @@
 #include "cache.h"
 #include "dir.h"
 #include "refs.h"
+#include "wildmatch.h"
 
 struct path_simplify {
        int len;
@@ -593,7 +594,9 @@ int match_pathname(const char *pathname, int pathlen,
                namelen -= prefix;
        }
 
-       return fnmatch_icase(pattern, name, FNM_PATHNAME) == 0;
+       return wildmatch(pattern, name,
+                        ignore_case ? WM_CASEFOLD : 0,
+                        NULL) == 0;
 }
 
 /* Scan the list and let the last match determine the fate.