]> git.ipfire.org Git - thirdparty/git.git/blob - t/t3433-rebase-across-mode-change.sh
diff: fix modified lines stats with --stat and --numstat
[thirdparty/git.git] / t / t3433-rebase-across-mode-change.sh
1 #!/bin/sh
2
3 test_description='git rebase across mode change'
4
5 . ./test-lib.sh
6
7 test_expect_success 'setup' '
8 mkdir DS &&
9 >DS/whatever &&
10 git add DS &&
11 git commit -m base &&
12
13 git branch side1 &&
14 git branch side2 &&
15
16 git checkout side1 &&
17 git rm -rf DS &&
18 test_ln_s_add unrelated DS &&
19 git commit -m side1 &&
20
21 git checkout side2 &&
22 >unrelated &&
23 git add unrelated &&
24 git commit -m commit1 &&
25
26 echo >>unrelated &&
27 git commit -am commit2
28 '
29
30 test_expect_success 'rebase changes with the apply backend' '
31 test_when_finished "git rebase --abort || true" &&
32 git checkout -b apply-backend side2 &&
33 git rebase side1
34 '
35
36 test_expect_success 'rebase changes with the merge backend' '
37 test_when_finished "git rebase --abort || true" &&
38 git checkout -b merge-backend side2 &&
39 git rebase -m side1
40 '
41
42 test_expect_success 'rebase changes with the merge backend with a delay' '
43 test_when_finished "git rebase --abort || true" &&
44 git checkout -b merge-delay-backend side2 &&
45 git rebase -m --exec "sleep 1" side1
46 '
47
48 test_done