(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 <'git-am mbox with dos line ending.\n'> <'\n'>)} spids: [13] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<file1>}) (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: 38 stdin_parts: [<'line 1\n'>] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<file1a>}) (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: 51 stdin_parts: [<'line 1\n'> <'line 4\n'>] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<file2>}) (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: 64 stdin_parts: [<'line 1\n'> <'line 2\n'>] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<file3>}) (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: 78 stdin_parts: [<'line 1\n'> <'line 2\n'> <'line 3\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'setup repository with dos files'>)} { (SQ <'\n'> <'\tappend_cr <file1 >file &&\n'> <'\tgit add file &&\n'> <'\tgit commit -m Initial &&\n'> <'\tgit tag initial &&\n'> <'\tappend_cr <file2 >file &&\n'> <'\tgit commit -a -m Second &&\n'> <'\tappend_cr <file3 >file &&\n'> <'\tgit commit -a -m Third\n'> ) } ) (C {<test_expect_success>} {(SQ <'am with dos files without --keep-cr'>)} { (SQ <'\n'> <'\tgit checkout -b dosfiles initial &&\n'> <'\tgit format-patch -k initial..master &&\n'> <'\ttest_must_fail git am -k -3 000*.patch &&\n'> <'\tgit am --abort &&\n'> <'\trm -rf .git/rebase-apply 000*.patch\n'> ) } ) (C {<test_expect_success>} {(SQ <'am with dos files with --keep-cr'>)} { (SQ <'\n'> <'\tgit checkout -b dosfiles-keep-cr initial &&\n'> <'\tgit format-patch -k --stdout initial..master | git am --keep-cr -k -3 &&\n'> <'\tgit diff --exit-code master\n'> ) } ) (C {<test_expect_success>} {(SQ <'am with dos files config am.keepcr'>)} { (SQ <'\n'> <'\tgit config am.keepcr 1 &&\n'> <'\tgit checkout -b dosfiles-conf-keepcr initial &&\n'> <'\tgit format-patch -k --stdout initial..master | git am -k -3 &&\n'> <'\tgit diff --exit-code master\n'> ) } ) (C {<test_expect_success>} {(SQ <'am with dos files config am.keepcr overridden by --no-keep-cr'>)} { (SQ <'\n'> <'\tgit config am.keepcr 1 &&\n'> <'\tgit checkout -b dosfiles-conf-keepcr-override initial &&\n'> <'\tgit format-patch -k initial..master &&\n'> <'\ttest_must_fail git am -k -3 --no-keep-cr 000*.patch &&\n'> <'\tgit am --abort &&\n'> <'\trm -rf .git/rebase-apply 000*.patch\n'> ) } ) (C {<test_expect_success>} {(SQ <'am with dos files with --keep-cr continue'>)} { (SQ <'\n'> <'\tgit checkout -b dosfiles-keep-cr-continue initial &&\n'> <'\tgit format-patch -k initial..master &&\n'> <'\tappend_cr <file1a >file &&\n'> <'\tgit commit -m "different patch" file &&\n'> <'\ttest_must_fail git am --keep-cr -k -3 000*.patch &&\n'> <'\tappend_cr <file2 >file &&\n'> <'\tgit add file &&\n'> <'\tgit am -3 --resolved &&\n'> <'\tgit diff --exit-code master\n'> ) } ) (C {<test_expect_success>} {(SQ <'am with unix files config am.keepcr overridden by --no-keep-cr'>)} { (SQ <'\n'> <'\tgit config am.keepcr 1 &&\n'> <'\tgit checkout -b unixfiles-conf-keepcr-override initial &&\n'> <'\tcp -f file1 file &&\n'> <'\tgit commit -m "line ending to unix" file &&\n'> <'\tgit format-patch -k initial..master &&\n'> <'\tgit am -k -3 --no-keep-cr 000*.patch &&\n'> <'\tgit diff --exit-code -w master\n'> ) } ) (C {<test_done>}) ] )