Merge branch 'nd/attr-pathspec-in-tree-walk'
The traversal over tree objects has learned to honor ":(attr:label)" pathspec match, which has been implemented only for enumerating paths on the filesystem. * nd/attr-pathspec-in-tree-walk: tree-walk: support :(attr) matching dir.c: move, rename and export match_attrs() pathspec.h: clean up "extern" in function declarations tree-walk.c: make tree_entry_interesting() take an index tree.c: make read_tree*() take 'struct repository *'
This commit is contained in:
@ -285,7 +285,8 @@ int write_archive_entries(struct archiver_args *args,
|
||||
git_attr_set_direction(GIT_ATTR_INDEX);
|
||||
}
|
||||
|
||||
err = read_tree_recursive(args->tree, "", 0, 0, &args->pathspec,
|
||||
err = read_tree_recursive(args->repo, args->tree, "",
|
||||
0, 0, &args->pathspec,
|
||||
queue_or_write_archive_entry,
|
||||
&context);
|
||||
if (err == READ_TREE_RECURSIVE)
|
||||
@ -346,7 +347,8 @@ static int path_exists(struct archiver_args *args, const char *path)
|
||||
ctx.args = args;
|
||||
parse_pathspec(&ctx.pathspec, 0, 0, "", paths);
|
||||
ctx.pathspec.recursive = 1;
|
||||
ret = read_tree_recursive(args->tree, "", 0, 0, &ctx.pathspec,
|
||||
ret = read_tree_recursive(args->repo, args->tree, "",
|
||||
0, 0, &ctx.pathspec,
|
||||
reject_entry, &ctx);
|
||||
clear_pathspec(&ctx.pathspec);
|
||||
return ret != 0;
|
||||
|
||||
Reference in New Issue
Block a user