aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/am.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-09-10 10:31:16 +0000
committerJunio C Hamano <gitster@pobox.com>2021-09-10 15:51:15 -0700
commitc5ead19ea282a288e01d86536349a4ae4a093e4b (patch)
treee996a253543c31cb895adbbf9f3d64a3f3af020f /builtin/am.c
parent42b5e09d1e555689168941eb639be644d004cb9d (diff)
downloadgit-c5ead19ea282a288e01d86536349a4ae4a093e4b.tar.gz
am: fix incorrect exit status on am fail to abort
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 0c2ad96b70..c79e0167e9 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2106,7 +2106,8 @@ static void am_abort(struct am_state *state)
if (!has_orig_head)
oidcpy(&orig_head, the_hash_algo->empty_tree);
- clean_index(&curr_head, &orig_head);
+ if (clean_index(&curr_head, &orig_head))
+ die(_("failed to clean index"));
if (has_orig_head)
update_ref("am --abort", "HEAD", &orig_head,