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" &&
26 test_expect_success 'rebase --abort' '
27 test_must_fail git rebase master &&
29 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase)
32 test_expect_success 'rebase --abort after --skip' '
33 # Clean up the state from the previous one
34 git reset --hard pre-rebase
37 test_must_fail git rebase master &&
38 test_must_fail git rebase --skip &&
39 test $(git rev-parse HEAD) = $(git rev-parse master) &&
41 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase)
44 test_expect_success 'rebase --abort after --continue' '
45 # Clean up the state from the previous one
46 git reset --hard pre-rebase
49 test_must_fail git rebase master &&
53 test_must_fail git rebase --continue &&
54 test $(git rev-parse HEAD) != $(git rev-parse master) &&
56 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase)