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
This commit is contained in:
Junio C Hamano
2021-09-20 11:22:09 -07:00
3 changed files with 43 additions and 1 deletions

View File

@ -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,