3 # Copyright (c) 2006 Eric Wong
6 test_description
='git rebase --merge --skip tests'
10 # we assume the default git-am -3 --skip strategy is tested independently
13 test_expect_success setup
'
16 git commit -m "hello" &&
17 git branch skip-reference &&
19 echo world >> hello &&
20 git commit -a -m "hello world" &&
21 echo goodbye >> hello &&
22 git commit -a -m "goodbye" &&
24 git checkout -f skip-reference &&
26 git commit -a -m "we should skip this" &&
29 git commit -m "this should not be skipped" &&
30 git branch pre-rebase skip-reference &&
31 git branch skip-merge skip-reference
34 test_expect_failure
'rebase with git am -3 (default)' '
38 test_expect_success
'rebase --skip with am -3' '
39 git reset --hard HEAD &&
42 test_expect_success
'checkout skip-merge' 'git checkout -f skip-merge'
44 test_expect_failure
'rebase with --merge' 'git rebase --merge master'
46 test_expect_success
'rebase --skip with --merge' '
47 git reset --hard HEAD &&
51 test_expect_success
'merge and reference trees equal' \
52 'test -z "`git diff-tree skip-merge skip-reference`"'
54 test_debug
'gitk --all & sleep 1'