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>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2010-12-15 22:02:46 +07:00
committed by Junio C Hamano
parent 86e4ca69e3
commit d38f28093e
5 changed files with 47 additions and 4 deletions

3
dir.c
View File

@ -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,