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