3 test_description
='merge conflict in crlf repo
11 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
=main
12 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
14 TEST_PASSES_SANITIZE_LEAK
=true
17 test_expect_success setup
'
18 git config core.autocrlf true &&
19 echo foo | append_cr >file &&
21 git commit -m "Initial" &&
24 echo line from a | append_cr >file &&
25 git commit -m "add line from a" file &&
28 echo line from b | append_cr >file &&
29 git commit -m "add line from b" file &&
34 test_expect_success
'Check "ours" is CRLF' '
35 git reset --hard initial &&
36 git merge side -s ours &&
37 cat file | remove_cr | append_cr >file.temp &&
38 test_cmp file file.temp
41 test_expect_success
'Check that conflict file is CRLF' '
43 test_must_fail git merge side &&
44 cat file | remove_cr | append_cr >file.temp &&
45 test_cmp file file.temp