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:31 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-01-14 12:13:05 -0800
commit150fe065f71778a6591566d6fde65171569a4b7a (patch)
treecdc2d2eaca21cb971756601af4cfa67af0545281 /builtin/am.c
parentmerge-recursive.c: remove implicit dependency on the_repository (diff)
downloadtgif-150fe065f71778a6591566d6fde65171569a4b7a.tar.xz
read-cache.c: remove the_* from index_has_changes()
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 611712dc95..a9ffc92eaa 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1719,7 +1719,7 @@ static void am_run(struct am_state *state, int resume)
refresh_and_write_cache();
- if (index_has_changes(&the_index, NULL, &sb)) {
+ if (repo_index_has_changes(the_repository, NULL, &sb)) {
write_state_bool(state, "dirtyindex", 1);
die(_("Dirty index: cannot apply patches (dirty: %s)"), sb.buf);
}
@@ -1777,7 +1777,7 @@ static void am_run(struct am_state *state, int resume)
* the result may have produced the same tree as ours.
*/
if (!apply_status &&
- !index_has_changes(&the_index, NULL, NULL)) {
+ !repo_index_has_changes(the_repository, NULL, NULL)) {
say(state, stdout, _("No changes -- Patch already applied."));
goto next;
}
@@ -1831,7 +1831,7 @@ static void am_resolve(struct am_state *state)
say(state, stdout, _("Applying: %.*s"), linelen(state->msg), state->msg);
- if (!index_has_changes(&the_index, NULL, NULL)) {
+ if (!repo_index_has_changes(the_repository, NULL, NULL)) {
printf_ln(_("No changes - did you forget to use 'git add'?\n"
"If there is nothing left to stage, chances are that something else\n"
"already introduced the same changes; you might want to skip this patch."));