summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-12-15 22:02:46 +0700
committerJunio C Hamano <gitster@pobox.com>2011-02-03 14:08:30 -0800
commitd38f28093ef795bef13d2fda6621b4952afb42db (patch)
treeee06d38a5a645292a66afa665a517f184ff7a151 /dir.c
parent86e4ca69e358836599d4eb0c0e217caa9c9e455b (diff)
downloadgit-d38f28093ef795bef13d2fda6621b4952afb42db.tar.gz
tree_entry_interesting(): support wildcard matching
never_interesting optimization is disabled if there is any wildcard pathspec, even if it only matches exactly on trees. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 5b4e2b1cb3..b6ccaf3703 100644
--- 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,