diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-09-21 17:57:32 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-09-21 09:48:11 -0700 |
| commit | 35843b1123e2772c5db6d7db5abf279c3253ae57 (patch) | |
| tree | 2ddded58ca61d8a808a407fceb5c55a043cbf135 /builtin/am.c | |
| parent | 58bf2a4cc7a929d2fe0ff30eda86fcec54aef0f8 (diff) | |
| download | git-35843b1123e2772c5db6d7db5abf279c3253ae57.tar.gz | |
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 'builtin/am.c')
| -rw-r--r-- | builtin/am.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/am.c b/builtin/am.c index 5e866d17c7..4c7a5bc576 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1604,7 +1604,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa o.verbosity = 0; if (merge_recursive_generic(&o, &our_tree, &their_tree, 1, bases, &result)) { - rerere(state->allow_rerere_autoupdate); + repo_rerere(the_repository, state->allow_rerere_autoupdate); free(their_tree_name); return error(_("Failed to merge in the changes.")); } @@ -1899,7 +1899,7 @@ static void am_resolve(struct am_state *state) goto next; } - rerere(0); + repo_rerere(the_repository, 0); do_commit(state); |
