diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-11-10 06:49:02 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-12 06:50:06 +0100 |
commit | c207e9e1f6dd1802f0deadae51af5615d855edc4 (patch) | |
tree | 4142d6b30b54e65a692a3240341400b09437e40f /builtin/read-tree.c | |
parent | bundle.c: remove the_repository references (diff) | |
download | git-c207e9e1f6dd1802f0deadae51af5615d855edc4.tar.xz git-c207e9e1f6dd1802f0deadae51af5615d855edc4.zip |
cache-tree.c: remove the_repository references
This case is more interesting than other boring "remove the_repo"
commits because while we need access to the object database, we cannot
simply use r->index because unpack-trees.c can operate on a temporary
index, not $GIT_DIR/index. Ideally we should be able to pass an object
database to lookup_tree() but that ship has sailed.
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 'builtin/read-tree.c')
-rw-r--r-- | builtin/read-tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/read-tree.c b/builtin/read-tree.c index fbbc98e516..c05c12d034 100644 --- a/builtin/read-tree.c +++ b/builtin/read-tree.c @@ -255,7 +255,9 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix) * what came from the tree. */ if (nr_trees == 1 && !opts.prefix) - prime_cache_tree(&the_index, trees[0]); + prime_cache_tree(the_repository, + the_repository->index, + trees[0]); if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK)) die("unable to write new index file"); |