excluded_1(): support exclude files in index
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index e8e5b7917d6207139c78b5c18b0e918aa55772bd..7735cea6316ead9e2827d1ddc7a49d5b36a4f65c 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -349,6 +349,12 @@ static int excluded_1(const char *pathname,
                        int to_exclude = x->to_exclude;
 
                        if (x->flags & EXC_FLAG_MUSTBEDIR) {
+                               if (!dtype) {
+                                       if (!prefixcmp(pathname, exclude))
+                                               return to_exclude;
+                                       else
+                                               continue;
+                               }
                                if (*dtype == DT_UNKNOWN)
                                        *dtype = get_dtype(NULL, pathname, pathlen);
                                if (*dtype != DT_DIR)