summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-08-13 18:14:39 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-13 14:14:44 -0700
commit82ea77eca7af238f1ee65f5cbc945a01e16ee97a (patch)
treeb22a81980f6a20a4e9148233f124f5d6bb5c4270 /builtin/apply.c
parentapply.c: pass struct apply_state to more functions (diff)
downloadtgif-82ea77eca7af238f1ee65f5cbc945a01e16ee97a.tar.xz
apply.c: make init_apply_state() take a struct repository
We're moving away from the_index in this code. "struct index_state *" could be added to struct apply_state. But let's aim long term and put struct repository here instead so that we could even avoid more global states in the future. The index will be available via apply_state->repo->index. 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/apply.c')
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 48d3989331..3f099b9605 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -16,7 +16,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix)
int ret;
struct apply_state state;
- if (init_apply_state(&state, prefix))
+ if (init_apply_state(&state, the_repository, prefix))
exit(128);
argc = apply_parse_options(argc, argv,