summaryrefslogtreecommitdiff
path: root/merge.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-12 09:13:26 +0700
committerJunio C Hamano <gitster@pobox.com>2019-01-14 12:13:04 -0800
commite1ff0a32e48eb0f3e53970df3f941d183093ff5a (patch)
treeb9d9a617170b562f93a9d262443a8bc45834ed74 /merge.c
parentfb4a8464a6d7ba643a8ebdb3ad8e1e84f0a01b0a (diff)
downloadgit-e1ff0a32e48eb0f3e53970df3f941d183093ff5a.tar.gz
read-cache.c: kill read_index()
read_index() shares the same problem as hold_locked_index(): it assumes $GIT_DIR/index. Move all call sites to repo_read_index() instead. read_index_preload() and read_index_unmerged() are also killed as a consequence. 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 'merge.c')
-rw-r--r--merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/merge.c b/merge.c
index dbbc9d9f80..7c1d756c3f 100644
--- a/merge.c
+++ b/merge.c
@@ -37,7 +37,7 @@ int try_merge_command(struct repository *r,
argv_array_clear(&args);
discard_index(r->index);
- if (read_index(r->index) < 0)
+ if (repo_read_index(r) < 0)
die(_("failed to read the cache"));
resolve_undo_clear_index(r->index);