]> git.ipfire.org Git - thirdparty/git.git/blame_incremental - t/t6419-merge-ignorecase.sh
Merge branch 'js/range-diff-wo-dotdot'
[thirdparty/git.git] / t / t6419-merge-ignorecase.sh
... / ...
CommitLineData
1#!/bin/sh
2
3test_description='git-merge with case-changing rename on case-insensitive file system'
4
5GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8. ./test-lib.sh
9
10if ! test_have_prereq CASE_INSENSITIVE_FS
11then
12 skip_all='skipping case insensitive tests - case sensitive file system'
13 test_done
14fi
15
16test_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
34'
35
36test_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
54'
55
56test_done