]>
Commit | Line | Data |
---|---|---|
ae352c7f DT |
1 | #!/bin/sh |
2 | ||
3 | test_description='git-merge with case-changing rename on case-insensitive file system' | |
4 | ||
5902f5f4 | 5 | GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
334afbc7 JS |
6 | export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
7 | ||
ae352c7f DT |
8 | . ./test-lib.sh |
9 | ||
10 | if ! test_have_prereq CASE_INSENSITIVE_FS | |
11 | then | |
12 | skip_all='skipping case insensitive tests - case sensitive file system' | |
13 | test_done | |
14 | fi | |
15 | ||
16 | test_expect_success 'merge with case-changing rename' ' | |
17 | test $(git config core.ignorecase) = true && | |
18 | >TestCase && | |
19 | git add TestCase && | |
20 | git commit -m "add TestCase" && | |
65e67587 | 21 | git tag baseline && |
ae352c7f DT |
22 | git checkout -b with-camel && |
23 | >foo && | |
24 | git add foo && | |
25 | git commit -m "intervening commit" && | |
5902f5f4 | 26 | git checkout main && |
ae352c7f DT |
27 | git rm TestCase && |
28 | >testcase && | |
29 | git add testcase && | |
30 | git commit -m "rename to testcase" && | |
31 | git checkout with-camel && | |
5902f5f4 | 32 | git merge main -m "merge" && |
ae352c7f DT |
33 | test_path_is_file testcase |
34 | ' | |
35 | ||
36 | test_expect_success 'merge with case-changing rename on both sides' ' | |
5902f5f4 | 37 | git checkout main && |
ae352c7f DT |
38 | git reset --hard baseline && |
39 | git branch -D with-camel && | |
40 | git checkout -b with-camel && | |
baa37bff | 41 | git mv TestCase testcase && |
ae352c7f DT |
42 | git commit -m "recase on branch" && |
43 | >foo && | |
44 | git add foo && | |
45 | git commit -m "intervening commit" && | |
5902f5f4 | 46 | git checkout main && |
ae352c7f DT |
47 | git rm TestCase && |
48 | >testcase && | |
49 | git add testcase && | |
50 | git commit -m "rename to testcase" && | |
51 | git checkout with-camel && | |
5902f5f4 | 52 | git merge main -m "merge" && |
ae352c7f DT |
53 | test_path_is_file testcase |
54 | ' | |
55 | ||
56 | test_done |