(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description spids:[21]) op: Equal rhs: {(SQ <'git-am mbox with dos line ending.\n'> <'\n'>)} spids: [21] ) ] spids: [21] ) (C {(.)} {(./test-lib.sh)}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(file1)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 46 stdin_parts: [('line 1\n')] ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(file1a)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 59 stdin_parts: [('line 1\n') ('line 4\n')] ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(file2)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 72 stdin_parts: [('line 1\n') ('line 2\n')] ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(file3)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 86 stdin_parts: [('line 1\n') ('line 2\n') ('line 3\n')] ) ] ) (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)}) ] )