summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 15:57:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-21 16:48:11 (GMT)
commit35843b1123e2772c5db6d7db5abf279c3253ae57 (patch)
tree2ddded58ca61d8a808a407fceb5c55a043cbf135 /sequencer.c
parent58bf2a4cc7a929d2fe0ff30eda86fcec54aef0f8 (diff)
downloadgit-35843b1123e2772c5db6d7db5abf279c3253ae57.zip
git-35843b1123e2772c5db6d7db5abf279c3253ae57.tar.gz
git-35843b1123e2772c5db6d7db5abf279c3253ae57.tar.bz2
rerere.c: remove implicit dependency on the_index
The reason rerere(), rerere_forget() and rerere_remaining() take a struct repository instead of struct index_state is not obvious from the patch: Deep in update_paths() and find_conflict(), hold_locked_index() and read_index() are called. These functions assumes the index path at $GIT_DIR/index which is not always true when you take an arbitrary index state. Taking a repository will allow us to point to the right index path later when we replace them with repo_ versions. 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 'sequencer.c')
-rw-r--r--sequencer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c
index 2adc66f..d9ff75a 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1856,7 +1856,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
: _("could not apply %s... %s"),
short_commit_name(commit), msg.subject);
print_advice(res == 1, opts);
- rerere(opts->allow_rerere_auto);
+ repo_rerere(the_repository, opts->allow_rerere_auto);
goto leave;
}
@@ -3175,7 +3175,7 @@ static int do_merge(struct commit *commit, const char *arg, int arg_len,
rollback_lock_file(&lock);
if (ret)
- rerere(opts->allow_rerere_auto);
+ repo_rerere(the_repository, opts->allow_rerere_auto);
else
/*
* In case of problems, we now want to return a positive