From 33e0f62ba981ebfdcab8c9fb6d2935712a7b9d41 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 5 Apr 2011 09:30:36 -0700 Subject: pathspec: rename per-item field has_wildcard to use_wildcard As the point of the last change is to allow use of strings as literals no matter what characters are in them, "has_wildcard" does not match what we use this field for anymore. It is used to decide if the wildcard matching should be used, so rename it to match the usage better. Signed-off-by: Junio C Hamano --- dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 168dad6152..91f1502ac6 100644 --- a/dir.c +++ b/dir.c @@ -230,7 +230,7 @@ static int match_pathspec_item(const struct pathspec_item *item, int prefix, return MATCHED_RECURSIVELY; } - if (item->has_wildcard && !fnmatch(match, name, 0)) + if (item->use_wildcard && !fnmatch(match, name, 0)) return MATCHED_FNMATCH; return 0; @@ -1286,8 +1286,8 @@ 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) + item->use_wildcard = !no_wildcard(path); + if (item->use_wildcard) pathspec->has_wildcard = 1; } -- cgit v1.2.3