2.36 fast-export regression fix
[git.git] / t / t6419-merge-ignorecase.sh
blobb64b75acf513d9d18f068c71b97b2ee10e6c1ec9
1 #!/bin/sh
3 test_description='git-merge with case-changing rename on case-insensitive file system'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8 . ./test-lib.sh
10 if ! test_have_prereq CASE_INSENSITIVE_FS
11 then
12 skip_all='skipping case insensitive tests - case sensitive file system'
13 test_done
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" &&
21 git tag baseline &&
22 git checkout -b with-camel &&
23 >foo &&
24 git add foo &&
25 git commit -m "intervening commit" &&
26 git checkout main &&
27 git rm TestCase &&
28 >testcase &&
29 git add testcase &&
30 git commit -m "rename to testcase" &&
31 git checkout with-camel &&
32 git merge main -m "merge" &&
33 test_path_is_file testcase
36 test_expect_success 'merge with case-changing rename on both sides' '
37 git checkout main &&
38 git reset --hard baseline &&
39 git branch -D with-camel &&
40 git checkout -b with-camel &&
41 git mv TestCase testcase &&
42 git commit -m "recase on branch" &&
43 >foo &&
44 git add foo &&
45 git commit -m "intervening commit" &&
46 git checkout main &&
47 git rm TestCase &&
48 >testcase &&
49 git add testcase &&
50 git commit -m "rename to testcase" &&
51 git checkout with-camel &&
52 git merge main -m "merge" &&
53 test_path_is_file testcase
56 test_done