(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: { (SQ (Token id:Id.Lit_Chars val:'git merge\n' span_id:6) (Token id:Id.Lit_Chars val:'\n' span_id:7) (Token id: Id.Lit_Chars val: 'Testing merge when using a custom message for the merge commit.' span_id: 8 ) ) } spids: [4] ) ] ) (C {(.)} {(./test-lib.sh)}) (command.ShFunction name: create_merge_msgs body: (command.BraceGroup children: [ (command.Simple words: [{(echo)} {(DQ ('custom message'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:26) fd: -1 arg_word: {(exp.subject)} ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {(cp)} {(exp.subject)} {(exp.log)}) (command.Simple words: [{(echo)} {(DQ )}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:46) fd: -1 arg_word: {(exp.log)} ) ] ) (command.Simple words: [{(echo)} {(DQ ("* tag 'c2':"))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:57) fd: -1 arg_word: {(exp.log)} ) ] ) (command.Simple words: [{(echo)} {(DQ (' c2'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:69) fd: -1 arg_word: {(exp.log)} ) ] ) ] ) ] ) ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:setup span_id:82))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:86) (Token id:Id.Lit_Chars val:'\techo c0 > c0.c &&\n' span_id:87) (Token id:Id.Lit_Chars val:'\tgit add c0.c &&\n' span_id:88) (Token id:Id.Lit_Chars val:'\tgit commit -m c0 &&\n' span_id:89) (Token id:Id.Lit_Chars val:'\tgit tag c0 &&\n' span_id:90) (Token id:Id.Lit_Chars val:'\techo c1 > c1.c &&\n' span_id:91) (Token id:Id.Lit_Chars val:'\tgit add c1.c &&\n' span_id:92) (Token id:Id.Lit_Chars val:'\tgit commit -m c1 &&\n' span_id:93) (Token id:Id.Lit_Chars val:'\tgit tag c1 &&\n' span_id:94) (Token id:Id.Lit_Chars val:'\tgit reset --hard c0 &&\n' span_id:95) (Token id:Id.Lit_Chars val:'\techo c2 > c2.c &&\n' span_id:96) (Token id:Id.Lit_Chars val:'\tgit add c2.c &&\n' span_id:97) (Token id:Id.Lit_Chars val:'\tgit commit -m c2 &&\n' span_id:98) (Token id:Id.Lit_Chars val:'\tgit tag c2 &&\n' span_id:99) (Token id:Id.Lit_Chars val:'\tcreate_merge_msgs\n' span_id:100) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'merge c2 with a custom message' span_id:108))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:112) (Token id:Id.Lit_Chars val:'\tgit reset --hard c1 &&\n' span_id:113) (Token id:Id.Lit_Chars val:'\tgit merge -m "$(cat exp.subject)" c2 &&\n' span_id:114) (Token id: Id.Lit_Chars val: '\tgit cat-file commit HEAD | sed -e "1,/^$/d" >actual &&\n' span_id: 115 ) (Token id:Id.Lit_Chars val:'\ttest_cmp exp.subject actual\n' span_id:116) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'merge --log appends to custom message' span_id:123))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:127) (Token id:Id.Lit_Chars val:'\tgit reset --hard c1 &&\n' span_id:128) (Token id:Id.Lit_Chars val:'\tgit merge --log -m "$(cat exp.subject)" c2 &&\n' span_id:129) (Token id: Id.Lit_Chars val: '\tgit cat-file commit HEAD | sed -e "1,/^$/d" >actual &&\n' span_id: 130 ) (Token id:Id.Lit_Chars val:'\ttest_cmp exp.log actual\n' span_id:131) ) } ) (C {(test_done)}) ] )