summaryrefslogtreecommitdiff
path: root/builtin/reset.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-11-10 06:49:02 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-12 14:50:06 +0900
commitc207e9e1f6dd1802f0deadae51af5615d855edc4 (patch)
tree4142d6b30b54e65a692a3240341400b09437e40f /builtin/reset.c
parentbundle.c: remove the_repository references (diff)
downloadtgif-c207e9e1f6dd1802f0deadae51af5615d855edc4.tar.xz
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/reset.c')
-rw-r--r--builtin/reset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index 5b4bbb0fb5..161b5e0cae 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -93,7 +93,7 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
if (reset_type == MIXED || reset_type == HARD) {
tree = parse_tree_indirect(oid);
- prime_cache_tree(&the_index, tree);
+ prime_cache_tree(the_repository, the_repository->index, tree);
}
ret = 0;