3 test_description
='am --abort'
7 test_expect_success setup
'
14 git add file-1 file-2 &&
15 git commit -m initial &&
21 git commit -a -m $i || break
23 git format-patch initial &&
24 git checkout -b side initial &&
25 echo local change >file-2-expect
30 test_expect_success
"am$with3 stops at a patch that does not apply" '
32 git reset --hard initial &&
33 cp file-2-expect file-2 &&
35 test_must_fail git am$with3 000[1245]-*.patch &&
36 git log --pretty=tformat:%s >actual &&
41 test_cmp expect actual
44 test_expect_success
"am$with3 --skip continue after failed am$with3" '
45 test_must_fail git-am$with3 --skip >output &&
46 test "$(grep "^Applying" output)" = "Applying 6" &&
47 test_cmp file-2-expect file-2 &&
48 test ! -f .git/rr-cache/MERGE_RR
51 test_expect_success
"am --abort goes back after failed am$with3" '
53 git rev-parse HEAD >actual &&
54 git rev-parse initial >expect &&
55 test_cmp expect actual &&
56 test_cmp file-2-expect file-2 &&
57 git diff-index --exit-code --cached HEAD &&
58 test ! -f .git/rr-cache/MERGE_RR