tree.c: make read_tree*() take 'struct repository *'
These functions call tree_entry_interesting() which will soon require a 'struct index_state *' to be passed in. Instead of just changing the function signature to take an index, update to take a repo instead because these functions do need object database access. 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:
committed by
Junio C Hamano
parent
0e94dab5be
commit
e092073d64
@ -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