3 test_description
='git rebase --abort tests'
7 ### Test that we handle space characters properly
8 work_dir
="$(pwd)/test dir"
10 test_expect_success setup
'
11 mkdir -p "$work_dir" &&
17 git branch to-rebase &&
24 git checkout to-rebase &&
26 git commit -a -m "merge should fail on this" &&
28 git commit -a -m "merge should fail on this, too" &&
36 test_expect_success
"rebase$type --abort" '
38 # Clean up the state from the previous one
39 git reset --hard pre-rebase &&
40 test_must_fail git rebase$type master &&
43 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
47 test_expect_success
"rebase$type --abort after --skip" '
49 # Clean up the state from the previous one
50 git reset --hard pre-rebase &&
51 test_must_fail git rebase$type master &&
53 test_must_fail git rebase --skip &&
54 test $(git rev-parse HEAD) = $(git rev-parse master) &&
56 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
60 test_expect_success
"rebase$type --abort after --continue" '
62 # Clean up the state from the previous one
63 git reset --hard pre-rebase &&
64 test_must_fail git rebase$type master &&
69 test_must_fail git rebase --continue &&
70 test $(git rev-parse HEAD) != $(git rev-parse master) &&
72 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
77 testrebase
"" .git
/rebase
78 testrebase
" --merge" .git
/rebase-merge