diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-12 13:51:46 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-12 13:51:46 -0700 |
commit | b809c3d9005cdbf6b193a78a32240b247ee81b36 (patch) | |
tree | d9cf56a8361b09a62cd63f8d26306e19ebab2987 /builtin/am.c | |
parent | Merge branch 'ps/update-ref-batch-flush' into maint (diff) | |
parent | am: fix incorrect exit status on am fail to abort (diff) | |
download | tgif-b809c3d9005cdbf6b193a78a32240b247ee81b36.tar.xz |
Merge branch 'en/am-abort-fix' into maint
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.c | 3 |
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, |