From 4edce1729a257ec9a420ff108e3b832b14d113c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 10 Nov 2018 06:49:00 +0100 Subject: branch.c: remove the_repository reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/reset.c') diff --git a/builtin/reset.c b/builtin/reset.c index 6d37a35e2e..5b4bbb0fb5 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -400,7 +400,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix) print_new_head_line(lookup_commit_reference(the_repository, &oid)); } if (!pathspec.nr) - remove_branch_state(); + remove_branch_state(the_repository); return update_ref_status; } -- cgit v1.2.3 From c207e9e1f6dd1802f0deadae51af5615d855edc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 10 Nov 2018 06:49:02 +0100 Subject: cache-tree.c: remove the_repository references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- builtin/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/reset.c') 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; -- cgit v1.2.3