summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-09-23 13:44:45 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-23 13:44:45 -0700
commit6c84b007c41638814137d296e75446a9b4865fd2 (patch)
treeb2cdbc8c83b206d183b21403a862515f2ee6a9a1 /builtin
parentMerge branch 'ps/update-ref-batch-flush' (diff)
parentam: fix incorrect exit status on am fail to abort (diff)
downloadtgif-6c84b007c41638814137d296e75446a9b4865fd2.tar.xz
Merge branch 'en/am-abort-fix'
When "git am --abort" fails to abort correctly, it still exited with exit status of 0, which has been corrected. * en/am-abort-fix: am: fix incorrect exit status on am fail to abort t4151: add a few am --abort tests git-am.txt: clarify --abort behavior
Diffstat (limited to 'builtin')
-rw-r--r--builtin/am.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 60f3737f99..e4a0ff9cd7 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2105,7 +2105,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,