summaryrefslogtreecommitdiff
path: root/builtin/am.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-09-23 20:44:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-23 20:44:45 (GMT)
commit6c84b007c41638814137d296e75446a9b4865fd2 (patch)
treeb2cdbc8c83b206d183b21403a862515f2ee6a9a1 /builtin/am.c
parent06a0eeaa25891edb6ef83c1ea62b2feb6e6652ab (diff)
parentc5ead19ea282a288e01d86536349a4ae4a093e4b (diff)
downloadgit-6c84b007c41638814137d296e75446a9b4865fd2.zip
git-6c84b007c41638814137d296e75446a9b4865fd2.tar.gz
git-6c84b007c41638814137d296e75446a9b4865fd2.tar.bz2
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/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 60f3737..e4a0ff9 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,