diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-23 20:44:45 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-23 20:44:45 (GMT) |
commit | 6c84b007c41638814137d296e75446a9b4865fd2 (patch) | |
tree | b2cdbc8c83b206d183b21403a862515f2ee6a9a1 /builtin/am.c | |
parent | 06a0eeaa25891edb6ef83c1ea62b2feb6e6652ab (diff) | |
parent | c5ead19ea282a288e01d86536349a4ae4a093e4b (diff) | |
download | git-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.c | 3 |
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, |