t/t4*: merge a "grep | sed" pipeline
[git.git] / t / t3433-rebase-across-mode-change.sh
blobc8172b0852233b6f370eab47c6cc4877db54d8f7
1 #!/bin/sh
3 test_description='git rebase across mode change'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 test_expect_success 'setup' '
9 mkdir DS &&
10 >DS/whatever &&
11 git add DS &&
12 git commit -m base &&
14 git branch side1 &&
15 git branch side2 &&
17 git checkout side1 &&
18 git rm -rf DS &&
19 test_ln_s_add unrelated DS &&
20 git commit -m side1 &&
22 git checkout side2 &&
23 >unrelated &&
24 git add unrelated &&
25 git commit -m commit1 &&
27 echo >>unrelated &&
28 git commit -am commit2
31 test_expect_success 'rebase changes with the apply backend' '
32 test_when_finished "git rebase --abort || true" &&
33 git checkout -b apply-backend side2 &&
34 git rebase side1
37 test_expect_success 'rebase changes with the merge backend' '
38 test_when_finished "git rebase --abort || true" &&
39 git checkout -b merge-backend side2 &&
40 git rebase -m side1
43 test_expect_success 'rebase changes with the merge backend with a delay' '
44 test_when_finished "git rebase --abort || true" &&
45 git checkout -b merge-delay-backend side2 &&
46 git rebase -m --exec "sleep 1" side1
49 test_done