summaryrefslogtreecommitdiff
path: root/builtin/am.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-12 09:13:26 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-01-14 12:13:04 -0800
commite1ff0a32e48eb0f3e53970df3f941d183093ff5a (patch)
treeb9d9a617170b562f93a9d262443a8bc45834ed74 /builtin/am.c
parentcheckout: avoid the_index when possible (diff)
downloadtgif-e1ff0a32e48eb0f3e53970df3f941d183093ff5a.tar.xz
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 'builtin/am.c')
-rw-r--r--builtin/am.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/am.c b/builtin/am.c
index d32044545d..901dc55078 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2278,7 +2278,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
/* Ensure a valid committer ident can be constructed */
git_committer_info(IDENT_STRICT);
- if (read_index_preload(&the_index, NULL, 0) < 0)
+ if (repo_read_index_preload(the_repository, NULL, 0) < 0)
die(_("failed to read the index"));
if (in_progress) {