am: fix incorrect exit status on am fail to abort
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
42b5e09d1e
commit
c5ead19ea2
@ -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,
|
||||
|
Reference in New Issue
Block a user