(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'RCS merge replacement: merge-file'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(orig.txt)} spids:[16]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [20] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(new1.txt)} spids:[35]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [39] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(new2.txt)} spids:[57]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [61] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(new3.txt)} spids:[75]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [79] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(new4.txt)} spids:[94]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [98] ) ] ) (SimpleCommand words: [{(printf)} {(DQ ('propter nomen suum.'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(new4.txt)} spids:[114])] ) (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'))} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect.txt)} spids:[241]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [245] ) ] ) (SimpleCommand words: [{(printf)} {(DQ ('propter nomen suum.'))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(expect.txt)} spids:[262])] ) (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'))} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect.txt)} spids:[301]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('<<<<<<< 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') ) } do_expansion: True here_end: EOF was_filled: True spids: [305] ) ] ) (C {(test_expect_success)} {(DQ ('expected conflict markers'))} {(DQ ('test_cmp test.txt expect.txt'))} ) (C {(cp)} {(backup.txt)} {(test.txt)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect.txt)} spids:[345]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [349] ) ] ) (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)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect.txt)} spids:[384]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [388] ) ] ) (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)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect.txt)} spids:[424]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [428] ) ] ) (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'))} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect.txt)} spids:[478]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('<<<<<<< 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') ) } do_expansion: True here_end: EOF was_filled: True spids: [482] ) ] ) (C {(test_expect_success)} {(DQ ('expected conflict markers, with -L'))} {(DQ ('test_cmp test.txt expect.txt'))} ) (SimpleCommand words: [{(sed)} {(DQ ('s/ tu / TU /'))}] redirects: [ (Redir op_id:Redir_Less fd:-1 arg_word:{(new1.txt)} spids:[521]) (Redir op_id:Redir_Great fd:-1 arg_word:{(new5.txt)} spids:[525]) ] ) (C {(test_expect_success)} {(DQ ('conflict in removed tail'))} {(DQ ('test_must_fail git merge-file -p orig.txt new1.txt new5.txt > out'))} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[544]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('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') ) } do_expansion: True here_end: EOF was_filled: True spids: [548] ) ] ) (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'> ) } ) (SimpleCommand words: [ {(sed)} {(-e)} {(DQ (s/deerit.) (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('/deerit;/'))} {(-e)} {(DQ ('s/me;') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (/me./))} ] redirects: [ (Redir op_id:Redir_Less fd:-1 arg_word:{(new5.txt)} spids:[610]) (Redir op_id:Redir_Great fd:-1 arg_word:{(new6.txt)} spids:[614]) ] ) (SimpleCommand words: [ {(sed)} {(-e)} {(DQ (s/deerit.) (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('/deerit,/'))} {(-e)} {(DQ ('s/me;') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('/me,/'))} ] redirects: [ (Redir op_id:Redir_Less fd:-1 arg_word:{(new5.txt)} spids:[636]) (Redir op_id:Redir_Great fd:-1 arg_word:{(new7.txt)} spids:[640]) ] ) (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'> ) } ) (Pipeline children: [ (SimpleCommand words: [{(sed)} {(-e)} {(SQ <'s/deerit./&%%%%/'>)} {(-e)} {(DQ ('s/locavit,/locavit;/'))}] redirects: [(Redir op_id:Redir_Less fd:-1 arg_word:{(new6.txt)} spids:[673])] ) (SimpleCommand words: [{(tr)} {(SQ <'%'>)} {(SQ <'\\012'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(new8.txt)} spids:[689])] ) ] negated: False ) (Pipeline children: [ (SimpleCommand words: [{(sed)} {(-e)} {(SQ <'s/deerit./&%%%%/'>)} {(-e)} {(DQ ('s/locavit,/locavit --/'))}] redirects: [(Redir op_id:Redir_Less fd:-1 arg_word:{(new7.txt)} spids:[707])] ) (SimpleCommand words: [{(tr)} {(SQ <'%'>)} {(SQ <'\\012'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(new9.txt)} spids:[723])] ) ] negated: False ) (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'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[746]) (HereDoc op_id: Redir_DLess fd: -1 body: {('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') } do_expansion: False here_end: EOF was_filled: True spids: [749] ) ] ) (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'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[785]) (HereDoc op_id: Redir_DLess fd: -1 body: {('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') } do_expansion: False here_end: EOF was_filled: True spids: [788] ) ] ) (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'> ) } ) (SimpleCommand words: [ {(printf)} { (DQ (line1) (EscapedLiteralPart token:<Lit_EscapedChar '\\n'>) (line2) (EscapedLiteralPart token:<Lit_EscapedChar '\\n'>) (line3) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(nolf-orig.txt)} spids:[817])] ) (SimpleCommand words: [ {(printf)} { (DQ (line1) (EscapedLiteralPart token:<Lit_EscapedChar '\\n'>) (line2) (EscapedLiteralPart token:<Lit_EscapedChar '\\n'>) (line3x) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(nolf-diff1.txt)} spids:[830])] ) (SimpleCommand words: [ {(printf)} { (DQ (line1) (EscapedLiteralPart token:<Lit_EscapedChar '\\n'>) (line2) (EscapedLiteralPart token:<Lit_EscapedChar '\\n'>) (line3y) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(nolf-diff2.txt)} spids:[843])] ) (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)}) ] )