compat/poll: sleep 1 millisecond to avoid busy wait
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index 5359d75e8baed3717da556e7dd65f979b058f541..98bb50fbabb69d25443df8ca4d29e11dea746a60 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -360,10 +360,10 @@ static int do_match_pathspec(const struct pathspec *ps,
 
 int match_pathspec(const struct pathspec *ps,
                   const char *name, int namelen,
-                  int prefix, char *seen)
+                  int prefix, char *seen, int is_dir)
 {
        int positive, negative;
-       unsigned flags = 0;
+       unsigned flags = is_dir ? DO_MATCH_DIRECTORY : 0;
        positive = do_match_pathspec(ps, name, namelen,
                                     prefix, seen, flags);
        if (!(ps->magic & PATHSPEC_EXCLUDE) || !positive)