rebase: factor out reference parsing
[git/dscho.git] / t / t3418-rebase-continue.sh
blob1d90191e542ad43d9d21837b9515b1b8ab647350
1 #!/bin/sh
3 test_description='git rebase --continue tests'
5 . ./test-lib.sh
7 . "$TEST_DIRECTORY"/lib-rebase.sh
9 set_fake_editor
11 test_expect_success 'setup' '
12 test_commit "commit-new-file-F1" F1 1 &&
13 test_commit "commit-new-file-F2" F2 2 &&
15 git checkout -b topic HEAD^ &&
16 test_commit "commit-new-file-F2-on-topic-branch" F2 22 &&
18 git checkout master
21 test_expect_success 'interactive rebase --continue works with touched file' '
22 rm -fr .git/rebase-* &&
23 git reset --hard &&
24 git checkout master &&
26 FAKE_LINES="edit 1" git rebase -i HEAD^ &&
27 test-chmtime =-60 F1 &&
28 git rebase --continue
31 test_expect_success 'non-interactive rebase --continue works with touched file' '
32 rm -fr .git/rebase-* &&
33 git reset --hard &&
34 git checkout master &&
36 test_must_fail git rebase --onto master master topic &&
37 echo "Resolved" >F2 &&
38 git add F2 &&
39 test-chmtime =-60 F1 &&
40 git rebase --continue
43 test_expect_success 'rebase --continue can not be used with other options' '
44 test_must_fail git rebase -v --continue &&
45 test_must_fail git rebase --continue -v
48 test_done