(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'RCS merge replacement: merge-file'>)} spids: [4] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<orig.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 32 stdin_parts: [ <'Dominus regit me,\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new1.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 55 stdin_parts: [ <'Dominus regit me,\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam tu mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new2.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 74 stdin_parts: [ <'Dominus regit me, et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new3.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 94 stdin_parts: [ <'DOMINUS regit me,\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new4.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 112 stdin_parts: [ <'Dominus regit me, et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<printf>} {(DQ <'propter nomen suum.'>)}] redirects: [(redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<new4.txt>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'merge with no changes'>)} { (SQ <'\n'> <'\tcp orig.txt test.txt &&\n'> <'\tgit merge-file test.txt orig.txt orig.txt &&\n'> <'\ttest_cmp test.txt orig.txt\n'> ) } ) (C {<cp>} {<new1.txt>} {<test.txt>}) (C {<test_expect_success>} {(DQ <'merge without conflict'>)} {(DQ <'git merge-file test.txt orig.txt new2.txt'>)} ) (C {<test_expect_success>} {(SQ <'works in subdirectory'>)} { (SQ <'\n'> <'\tmkdir dir &&\n'> <'\tcp new1.txt dir/a.txt &&\n'> <'\tcp orig.txt dir/o.txt &&\n'> <'\tcp new2.txt dir/b.txt &&\n'> <'\t( cd dir && git merge-file a.txt o.txt b.txt ) &&\n'> <'\ttest_path_is_missing a.txt\n'> ) } ) (C {<cp>} {<new1.txt>} {<test.txt>}) (C {<test_expect_success>} {(DQ <'merge without conflict (--quiet)'>)} {(DQ <'git merge-file --quiet test.txt orig.txt new2.txt'>)} ) (C {<cp>} {<new1.txt>} {<test2.txt>}) (C {<test_expect_failure>} {(DQ <'merge without conflict (missing LF at EOF)'>)} {(DQ <'git merge-file test2.txt orig.txt new4.txt'>)} ) (C {<test_expect_failure>} {(DQ <'merge result added missing LF'>)} {(DQ <'test_cmp test.txt test2.txt'>)} ) (C {<cp>} {<new4.txt>} {<test3.txt>}) (C {<test_expect_success>} {(DQ <'merge without conflict (missing LF at EOF, away from change in the other file)'>)} {(DQ <'git merge-file --quiet test3.txt new2.txt new3.txt'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 261 stdin_parts: [ <'DOMINUS regit me,\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<printf>} {(DQ <'propter nomen suum.'>)}] redirects: [(redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<expect.txt>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(DQ <'merge does not add LF away of change'>)} {(DQ <'test_cmp test3.txt expect.txt'>)} ) (C {<cp>} {<test.txt>} {<backup.txt>}) (C {<test_expect_success>} {(DQ <'merge with conflicts'>)} {(DQ <'test_must_fail git merge-file test.txt orig.txt new3.txt'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 330 stdin_parts: [ <'<<<<<<< test.txt\n'> <'Dominus regit me, et nihil mihi deerit.\n'> <'=======\n'> <'DOMINUS regit me,\n'> <'et nihil mihi deerit.\n'> <'>>>>>>> new3.txt\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam tu mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(DQ <'expected conflict markers'>)} {(DQ <'test_cmp test.txt expect.txt'>)} ) (C {<cp>} {<backup.txt>} {<test.txt>}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 370 stdin_parts: [ <'Dominus regit me, et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam tu mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(DQ <'merge conflicting with --ours'>)} {(DQ <'git merge-file --ours test.txt orig.txt new3.txt && test_cmp test.txt expect.txt'>)} ) (C {<cp>} {<backup.txt>} {<test.txt>}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 411 stdin_parts: [ <'DOMINUS regit me,\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam tu mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(DQ <'merge conflicting with --theirs'>)} {(DQ <'git merge-file --theirs test.txt orig.txt new3.txt && test_cmp test.txt expect.txt'>)} ) (C {<cp>} {<backup.txt>} {<test.txt>}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 453 stdin_parts: [ <'Dominus regit me, et nihil mihi deerit.\n'> <'DOMINUS regit me,\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam tu mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(DQ <'merge conflicting with --union'>)} {(DQ <'git merge-file --union test.txt orig.txt new3.txt && test_cmp test.txt expect.txt'>)} ) (C {<cp>} {<backup.txt>} {<test.txt>}) (C {<test_expect_success>} {(DQ <'merge with conflicts, using -L'>)} {(DQ <'test_must_fail git merge-file -L 1 -L 2 test.txt orig.txt new3.txt'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect.txt>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 511 stdin_parts: [ <'<<<<<<< 1\n'> <'Dominus regit me, et nihil mihi deerit.\n'> <'=======\n'> <'DOMINUS regit me,\n'> <'et nihil mihi deerit.\n'> <'>>>>>>> new3.txt\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam tu mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(DQ <'expected conflict markers, with -L'>)} {(DQ <'test_cmp test.txt expect.txt'>)} ) (command.Simple words: [{<sed>} {(DQ <'s/ tu / TU /'>)}] redirects: [ (redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<new1.txt>}) (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new5.txt>}) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(DQ <'conflict in removed tail'>)} {(DQ <'test_must_fail git merge-file -p orig.txt new1.txt new5.txt > out'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 577 stdin_parts: [ <'Dominus regit me,\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'<<<<<<< orig.txt\n'> <'=======\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam TU mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> <'>>>>>>> new5.txt\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(DQ <'expected conflict markers'>)} {(DQ <'test_cmp expect out'>)}) (C {<test_expect_success>} {(SQ <'binary files cannot be merged'>)} { (SQ <'\n'> <'\ttest_must_fail git merge-file -p \\\n'> <'\t\torig.txt "$TEST_DIRECTORY"/test-binary-1.png new1.txt 2> merge.err &&\n'> <'\tgrep "Cannot merge binary files" merge.err\n'> ) } ) (command.Simple words: [ {<sed>} {<-e>} { (DQ <'s/deerit.'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'/deerit;/'> ) } {<-e>} {(DQ <'s/me;'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'/me./'>)} ] redirects: [ (redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<new5.txt>}) (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new6.txt>}) ] more_env: [] do_fork: T ) (command.Simple words: [ {<sed>} {<-e>} { (DQ <'s/deerit.'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'/deerit,/'> ) } {<-e>} {(DQ <'s/me;'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'/me,/'>)} ] redirects: [ (redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<new5.txt>}) (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new7.txt>}) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'MERGE_ZEALOUS simplifies non-conflicts'>)} { (SQ <'\n'> <'\n'> <'\ttest_must_fail git merge-file -p new6.txt new5.txt new7.txt > output &&\n'> <'\ttest 1 = $(grep ======= < output | wc -l)\n'> <'\n'> ) } ) (command.Pipeline children: [ (command.Simple words: [{<sed>} {<-e>} {(SQ <'s/deerit./&%%%%/'>)} {<-e>} {(DQ <'s/locavit,/locavit;/'>)}] redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<new6.txt>})] more_env: [] do_fork: T ) (command.Simple words: [{<tr>} {(SQ <'%'>)} {(SQ <'\\012'>)}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new8.txt>})] more_env: [] do_fork: T ) ] negated: F stderr_indices: [] ) (command.Pipeline children: [ (command.Simple words: [{<sed>} {<-e>} {(SQ <'s/deerit./&%%%%/'>)} {<-e>} {(DQ <'s/locavit,/locavit --/'>)}] redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<new7.txt>})] more_env: [] do_fork: T ) (command.Simple words: [{<tr>} {(SQ <'%'>)} {(SQ <'\\012'>)}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<new9.txt>})] more_env: [] do_fork: T ) ] negated: F stderr_indices: [] ) (C {<test_expect_success>} {(SQ <ZEALOUS_ALNUM>)} { (SQ <'\n'> <'\n'> <'\ttest_must_fail git merge-file -p \\\n'> <'\t\tnew8.txt new5.txt new9.txt > merge.out &&\n'> <'\ttest 1 = $(grep ======= < merge.out | wc -l)\n'> <'\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 793 stdin_parts: [ <'Dominus regit me,\n'> <'<<<<<<< new8.txt\n'> <'et nihil mihi deerit;\n'> <'\n'> <'\n'> <'\n'> <'\n'> <'In loco pascuae ibi me collocavit;\n'> <'super aquam refectionis educavit me.\n'> <'||||||| new5.txt\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'=======\n'> <'et nihil mihi deerit,\n'> <'\n'> <'\n'> <'\n'> <'\n'> <'In loco pascuae ibi me collocavit --\n'> <'super aquam refectionis educavit me,\n'> <'>>>>>>> new9.txt\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam TU mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'"diff3 -m" style output (1)'>)} { (SQ <'\n'> <'\ttest_must_fail git merge-file -p --diff3 \\\n'> <'\t\tnew8.txt new5.txt new9.txt >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"diff3 -m" style output (2)'>)} { (SQ <'\n'> <'\tgit config merge.conflictstyle diff3 &&\n'> <'\ttest_must_fail git merge-file -p \\\n'> <'\t\tnew8.txt new5.txt new9.txt >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 861 stdin_parts: [ <'Dominus regit me,\n'> <'<<<<<<<<<< new8.txt\n'> <'et nihil mihi deerit;\n'> <'\n'> <'\n'> <'\n'> <'\n'> <'In loco pascuae ibi me collocavit;\n'> <'super aquam refectionis educavit me.\n'> <'|||||||||| new5.txt\n'> <'et nihil mihi deerit.\n'> <'In loco pascuae ibi me collocavit,\n'> <'super aquam refectionis educavit me;\n'> <'==========\n'> <'et nihil mihi deerit,\n'> <'\n'> <'\n'> <'\n'> <'\n'> <'In loco pascuae ibi me collocavit --\n'> <'super aquam refectionis educavit me,\n'> <'>>>>>>>>>> new9.txt\n'> <'animam meam convertit,\n'> <'deduxit me super semitas jusitiae,\n'> <'propter nomen suum.\n'> <'Nam et si ambulavero in medio umbrae mortis,\n'> <'non timebo mala, quoniam TU mecum es:\n'> <'virga tua et baculus tuus ipsa me consolata sunt.\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'marker size'>)} { (SQ <'\n'> <'\ttest_must_fail git merge-file -p --marker-size=10 \\\n'> <'\t\tnew8.txt new5.txt new9.txt >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [ {<printf>} {(DQ <line1> <Id.Lit_BadBackslash '\\'> <nline2> <Id.Lit_BadBackslash '\\'> <nline3>)} ] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<nolf-orig.txt>})] more_env: [] do_fork: T ) (command.Simple words: [ {<printf>} {(DQ <line1> <Id.Lit_BadBackslash '\\'> <nline2> <Id.Lit_BadBackslash '\\'> <nline3x>)} ] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<nolf-diff1.txt>})] more_env: [] do_fork: T ) (command.Simple words: [ {<printf>} {(DQ <line1> <Id.Lit_BadBackslash '\\'> <nline2> <Id.Lit_BadBackslash '\\'> <nline3y>)} ] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<nolf-diff2.txt>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'conflict at EOF without LF resolved by --ours'>)} { (SQ <'git merge-file -p --ours nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >output.txt &&\n'> <'\t printf "line1\\nline2\\nline3x" >expect.txt &&\n'> <'\t test_cmp expect.txt output.txt'> ) } ) (C {<test_expect_success>} {(SQ <'conflict at EOF without LF resolved by --theirs'>)} { (SQ < 'git merge-file -p --theirs nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >output.txt &&\n' > <'\t printf "line1\\nline2\\nline3y" >expect.txt &&\n'> <'\t test_cmp expect.txt output.txt'> ) } ) (C {<test_expect_success>} {(SQ <'conflict at EOF without LF resolved by --union'>)} { (SQ <'git merge-file -p --union nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >output.txt &&\n'> <'\t printf "line1\\nline2\\nline3x\\nline3y" >expect.txt &&\n'> <'\t test_cmp expect.txt output.txt'> ) } ) (C {<test_expect_success>} {(SQ <'conflict sections match existing line endings'>)} { (SQ <'\n'> <'\tprintf "1\\\\r\\\\n2\\\\r\\\\n3" >crlf-orig.txt &&\n'> <'\tprintf "1\\\\r\\\\n2\\\\r\\\\n4" >crlf-diff1.txt &&\n'> <'\tprintf "1\\\\r\\\\n2\\\\r\\\\n5" >crlf-diff2.txt &&\n'> <'\ttest_must_fail git -c core.eol=crlf merge-file -p \\\n'> <'\t\tcrlf-diff1.txt crlf-orig.txt crlf-diff2.txt >crlf.txt &&\n'> <'\ttest $(tr "\\015" Q <crlf.txt | grep "^[<=>].*Q$" | wc -l) = 3 &&\n'> <'\ttest $(tr "\\015" Q <crlf.txt | grep "[345]Q$" | wc -l) = 3 &&\n'> <'\ttest_must_fail git -c core.eol=crlf merge-file -p \\\n'> <'\t\tnolf-diff1.txt nolf-orig.txt nolf-diff2.txt >nolf.txt &&\n'> <'\ttest $(tr "\\015" Q <nolf.txt | grep "^[<=>].*Q$" | wc -l) = 0\n'> ) } ) (C {<test_done>}) ] )