3 test_description
='git rebase --abort tests'
7 test_expect_success setup
'
11 git branch to-rebase &&
18 git checkout to-rebase &&
20 git commit -a -m "merge should fail on this" &&
22 git commit -a -m "merge should fail on this, too" &&
30 test_expect_success
"rebase$type --abort" '
31 # Clean up the state from the previous one
32 git reset --hard pre-rebase
33 test_must_fail git rebase'"$type"' master &&
36 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
40 test_expect_success
"rebase$type --abort after --skip" '
41 # Clean up the state from the previous one
42 git reset --hard pre-rebase
43 test_must_fail git rebase'"$type"' master &&
45 test_must_fail git rebase --skip &&
46 test $(git rev-parse HEAD) = $(git rev-parse master) &&
48 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
52 test_expect_success
"rebase$type --abort after --continue" '
53 # Clean up the state from the previous one
54 git reset --hard pre-rebase
55 test_must_fail git rebase'"$type"' master &&
60 test_must_fail git rebase --continue &&
61 test $(git rev-parse HEAD) != $(git rev-parse master) &&
63 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
69 testrebase
" --merge" .git
/.dotest-merge