Merge branch 'jc/bigfile'
[git/jnareb-git.git] / t / t6033-merge-crlf.sh
blobe8d65eefb521cc9f2e8211918734d069381772d4
1 #!/bin/sh
3 test_description='merge conflict in crlf repo
5 b---M
6 / /
7 initial---a
11 . ./test-lib.sh
13 test_expect_success setup '
14 git config core.autocrlf true &&
15 echo foo | append_cr >file &&
16 git add file &&
17 git commit -m "Initial" &&
18 git tag initial &&
19 git branch side &&
20 echo line from a | append_cr >file &&
21 git commit -m "add line from a" file &&
22 git tag a &&
23 git checkout side &&
24 echo line from b | append_cr >file &&
25 git commit -m "add line from b" file &&
26 git tag b &&
27 git checkout master
30 test_expect_success 'Check "ours" is CRLF' '
31 git reset --hard initial &&
32 git merge side -s ours &&
33 cat file | remove_cr | append_cr >file.temp &&
34 test_cmp file file.temp
37 test_expect_success 'Check that conflict file is CRLF' '
38 git reset --hard a &&
39 test_must_fail git merge side &&
40 cat file | remove_cr | append_cr >file.temp &&
41 test_cmp file file.temp
44 test_done