3 test_description
='CRLF merge conflict across text=auto change'
7 test_expect_success setup
'
8 git config merge.renormalize true &&
9 git config core.autocrlf false &&
10 echo first line | append_cr >file &&
11 echo first line >control_file &&
12 echo only line >inert_file &&
13 git add file control_file inert_file &&
14 git commit -m "Initial" &&
17 echo "* text=auto" >.gitattributes &&
19 git add .gitattributes file &&
20 git commit -m "normalize file" &&
21 echo same line | append_cr >>file &&
22 echo same line >>control_file &&
23 git add file control_file &&
24 git commit -m "add line from a" &&
26 git rm .gitattributes &&
29 git commit -m "remove .gitattributes" &&
32 echo same line | append_cr >>file &&
33 echo same line >>control_file &&
34 git add file control_file &&
35 git commit -m "add line from b" &&
40 test_expect_success
'Check merging after setting text=auto' '
43 cat file | remove_cr >file.temp &&
44 test_cmp file file.temp
47 test_expect_success
'Check merging addition of text=auto' '
50 cat file | remove_cr >file.temp &&
51 test_cmp file file.temp
54 test_expect_failure
'Test delete/normalize conflict' '
56 git reset --hard initial &&
58 git commit -m "remove file" &&
59 git checkout master &&
60 git reset --hard a^ &&