| test_description='am --abort' |
| test_expect_success setup ' |
| git commit -a -m $i || break |
| git format-patch --no-numbered initial && |
| git checkout -b side initial && |
| echo local change >file-2-expect |
| test_expect_success "am$with3 stops at a patch that does not apply" ' |
| git reset --hard initial && |
| cp file-2-expect file-2 && |
| test_must_fail git am$with3 000[1245]-*.patch && |
| git log --pretty=tformat:%s >actual && |
| test_expect_success "am$with3 --skip continue after failed am$with3" ' |
| test_must_fail git am$with3 --skip >output && |
| test "$(grep "^Applying" output)" = "Applying: 6" && |
| test_cmp file-2-expect file-2 && |
| test ! -f .git/rr-cache/MERGE_RR |
| test_expect_success "am --abort goes back after failed am$with3" ' |
| git rev-parse HEAD >actual && |
| git rev-parse initial >expect && |
| test_cmp expect actual && |
| test_cmp file-2-expect file-2 && |
| git diff-index --exit-code --cached HEAD && |
| test ! -f .git/rr-cache/MERGE_RR |