Merge branch 'nd/struct-pathspec'

* nd/struct-pathspec:
  pathspec: rename per-item field has_wildcard to use_wildcard
  Improve tree_entry_interesting() handling code
  Convert read_tree{,_recursive} to support struct pathspec
  Reimplement read_tree_recursive() using tree_entry_interesting()
This commit is contained in:
Junio C Hamano
2011-05-06 10:50:06 -07:00
15 changed files with 148 additions and 169 deletions

6
dir.c
View File

@ -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;
@ -1274,8 +1274,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;
}