]> git.ipfire.org Git - thirdparty/git.git/commit - rerere.c
rerere.c: remove implicit dependency on the_index
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 21 Sep 2018 15:57:32 +0000 (17:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Sep 2018 16:48:11 +0000 (09:48 -0700)
commit35843b1123e2772c5db6d7db5abf279c3253ae57
tree2ddded58ca61d8a808a407fceb5c55a043cbf135
parent58bf2a4cc7a929d2fe0ff30eda86fcec54aef0f8
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>
apply.c
builtin/am.c
builtin/commit.c
builtin/merge.c
builtin/rerere.c
rerere.c
rerere.h
sequencer.c