worktree: stop being overly intimate with run_command() internals
[git.git] / t / t6413-merge-crlf.sh
blobaffea255fe92ca134a553d2a69362a8f8f7a8ab1
1 #!/bin/sh
3 test_description='merge conflict in crlf repo
5 b---M
6 / /
7 initial---a
11 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
12 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
14 . ./test-lib.sh
16 test_expect_success setup '
17 git config core.autocrlf true &&
18 echo foo | append_cr >file &&
19 git add file &&
20 git commit -m "Initial" &&
21 git tag initial &&
22 git branch side &&
23 echo line from a | append_cr >file &&
24 git commit -m "add line from a" file &&
25 git tag a &&
26 git checkout side &&
27 echo line from b | append_cr >file &&
28 git commit -m "add line from b" file &&
29 git tag b &&
30 git checkout main
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' '
41 git reset --hard a &&
42 test_must_fail git merge side &&
43 cat file | remove_cr | append_cr >file.temp &&
44 test_cmp file file.temp
47 test_done