diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-11-18 17:47:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-19 10:50:33 +0900 |
commit | e092073d643b17c82d72cf692fbfaea9c9796f11 (patch) | |
tree | 303e6f2f58bf1817a9b0f9365761e86c5bc1053a /archive.c | |
parent | 0e94dab5be2fd17cfba634f8a29ba5461d2cbd9e (diff) | |
download | git-e092073d643b17c82d72cf692fbfaea9c9796f11.tar.gz |
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>
Diffstat (limited to 'archive.c')
-rw-r--r-- | archive.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |