summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-09-20 11:22:09 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-20 11:22:09 -0700
commit04d3761db214512fa29db39bd43e0b162396045c (patch)
tree6572361322d0f0262a0239daee989dda353dcf11 /builtin
parentThe sixth batch (diff)
parentam: fix incorrect exit status on am fail to abort (diff)
downloadtgif-04d3761db214512fa29db39bd43e0b162396045c.tar.xz
Merge branch 'en/am-abort-fix' into en/removing-untracked-fixes
* 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 ff7dd33fcd..72cb3cc070 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,