Nguyán ThÃi Ngác Duy <pclouds@xxxxxxxxx> writes: > Signed-off-by: Nguyán ThÃi Ngác Duy <pclouds@xxxxxxxxx> > --- > tree-walk.c | 33 ++++++++++++++++++++++++++++++--- > tree-walk.h | 2 +- > 2 files changed, 31 insertions(+), 4 deletions(-) ;-) Looks almost too easy. > diff --git a/tree-walk.c b/tree-walk.c > index d28de30..b5ad42b 100644 > --- a/tree-walk.c > +++ b/tree-walk.c > @@ -596,6 +598,31 @@ int tree_entry_interesting(const struct name_entry *entry, > &never_interesting)) > return 1; > } > + > +match_wildcards: > + /* > + * Concatenate base and entry->path into one and do > + * fnmatch() on it. > + */ > + > + if (!item->has_wildcard) > + continue; I think the comment comes after this if--continue. > + never_interesting = 0; When we have wildcard we would want to disable the never-interesting optimization, but I wonder if doing so only when we do not have exact hit is what we want. If a sick person had a path "a?b" tracked, and asked to match a pathspec "a?b", don't we still want to say "'a?b' of course matches, but 'a1b' ('1' comes earlier than '?' in the sort order) and 'aAb' ('A' comes later) also match"? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html