(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"test subject preservation with format-patch | am">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (FuncDef name: make_patches body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:type) op: Equal rhs: {($ VSub_Number "$1")} spids: [21] ) ] spids: [21] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subject) op: Equal rhs: {($ VSub_Number "$2")} spids: [25] ) ] spids: [25] ) (C {(test_expect_success)} {(DQ ("create patches with ") ($ VSub_Name "$type") (" subject"))} { (SQ <"\n"> <"\t\tgit reset --hard baseline &&\n"> <"\t\techo $type >file &&\n"> <"\t\tgit commit -a -m \"$subject\" &&\n"> <"\t\tgit format-patch -1 --stdout >$type.patch &&\n"> <"\t\tgit format-patch -1 --stdout -k >$type-k.patch\n"> <"\t"> ) } ) ] spids: [18] ) spids: [14 17] ) (FuncDef name: check_subject body: (BraceGroup children: [ (AndOr children: [ (C {(git)} {(reset)} {(--hard)} {(baseline)}) (AndOr children: [ (C {(git)} {(am)} {($ VSub_Number "$2")} {($ VSub_Number "$1") (.patch)}) (AndOr children: [ (SimpleCommand words: [ {(git)} {(log)} {(-1)} {(--pretty) (Lit_Other "=") (format) (Lit_Other ":") (Lit_Other "%") (B)} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(actual)} spids:[93])] ) (C {(test_cmp)} {(expect)} {(actual)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [54] ) spids: [50 53] ) (C {(test_expect_success)} {(SQ <"setup baseline commit">)} {(SQ <"\n"> <"\ttest_commit baseline file\n">)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SHORT_SUBJECT) op: Equal rhs: {(SQ <"short subject">)} spids: [120] ) ] spids: [120] ) (C {(make_patches)} {(short)} {(DQ ($ VSub_Name "$SHORT_SUBJECT"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONG_SUBJECT1) op: Equal rhs: {(SQ <"this is a long subject that is virtually guaranteed">)} spids: [134] ) ] spids: [134] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONG_SUBJECT2) op: Equal rhs: {(SQ <"to require wrapping via format-patch if it is all">)} spids: [139] ) ] spids: [139] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONG_SUBJECT3) op: Equal rhs: {(SQ <"going to appear on a single line">)} spids: [144] ) ] spids: [144] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONG_SUBJECT) op: Equal rhs: { (DQ ($ VSub_Name "$LONG_SUBJECT1") (" ") ($ VSub_Name "$LONG_SUBJECT2") (" ") ($ VSub_Name "$LONG_SUBJECT3") ) } spids: [149] ) ] spids: [149] ) (C {(make_patches)} {(long)} {(DQ ($ VSub_Name "$LONG_SUBJECT"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MULTILINE_SUBJECT) op: Equal rhs: { (DQ ($ VSub_Name "$LONG_SUBJECT1") ("\n") ($ VSub_Name "$LONG_SUBJECT2") ("\n") ($ VSub_Name "$LONG_SUBJECT3") ) } spids: [167] ) ] spids: [167] ) (C {(make_patches)} {(multiline)} {(DQ ($ VSub_Name "$MULTILINE_SUBJECT"))}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name "$SHORT_SUBJECT"))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[191])] ) (C {(test_expect_success)} {(SQ <"short subject preserved (format-patch | am)">)} {(SQ <"\n"> <"\tcheck_subject short\n">)} ) (C {(test_expect_success)} {(SQ <"short subject preserved (format-patch -k | am)">)} {(SQ <"\n"> <"\tcheck_subject short-k\n">)} ) (C {(test_expect_success)} {(SQ <"short subject preserved (format-patch -k | am -k)">)} {(SQ <"\n"> <"\tcheck_subject short-k -k\n">)} ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name "$LONG_SUBJECT"))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[234])] ) (C {(test_expect_success)} {(SQ <"long subject preserved (format-patch | am)">)} {(SQ <"\n"> <"\tcheck_subject long\n">)} ) (C {(test_expect_success)} {(SQ <"long subject preserved (format-patch -k | am)">)} {(SQ <"\n"> <"\tcheck_subject long-k\n">)} ) (C {(test_expect_success)} {(SQ <"long subject preserved (format-patch -k | am -k)">)} {(SQ <"\n"> <"\tcheck_subject long-k -k\n">)} ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name "$LONG_SUBJECT"))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[277])] ) (C {(test_expect_success)} {(SQ <"multiline subject unwrapped (format-patch | am)">)} {(SQ <"\n"> <"\tcheck_subject multiline\n">)} ) (C {(test_expect_success)} {(SQ <"multiline subject unwrapped (format-patch -k | am)">)} {(SQ <"\n"> <"\tcheck_subject multiline-k\n">)} ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name "$MULTILINE_SUBJECT"))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[308])] ) (C {(test_expect_success)} {(SQ <"multiline subject preserved (format-patch -k | am -k)">)} {(SQ <"\n"> <"\tcheck_subject multiline-k -k\n">)} ) (C {(test_done)}) ] )