Code

tree_entry_interesting(): support wildcard matching
[git.git] / dir.c
diff --git a/dir.c b/dir.c
index 5b4e2b1cb32c9a00d001d4202d8ebb09e30e7103..b6ccaf3703a262416e8c16ae2e72348e170a8d63 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -1197,6 +1197,9 @@ int init_pathspec(struct pathspec *pathspec, const char **paths)
 
                item->match = path;
                item->len = strlen(path);
+               item->has_wildcard = !no_wildcard(path);
+               if (item->has_wildcard)
+                       pathspec->has_wildcard = 1;
        }
 
        qsort(pathspec->items, pathspec->nr,