(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: 
            {
              (SQ <"git merge\n"> <"\n"> 
                <"Testing merge when using a custom message for the merge commit.">
              )
            }
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: create_merge_msgs
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ("custom message"))}]
              redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(exp.subject)} spids:[26])]
            )
            (AndOr
              children: [
                (C {(cp)} {(exp.subject)} {(exp.log)})
                (AndOr
                  children: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ )}]
                      redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(exp.log)} spids:[46])]
                    )
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {(DQ ("* tag 'c2':"))}]
                          redirects: [
                            (Redir
                              op_id: Redir_DGreat
                              fd: -1
                              arg_word: {(exp.log)}
                              spids: [57]
                            )
                          ]
                        )
                        (SimpleCommand
                          words: [{(echo)} {(DQ ("  c2"))}]
                          redirects: [
                            (Redir
                              op_id: Redir_DGreat
                              fd: -1
                              arg_word: {(exp.log)}
                              spids: [69]
                            )
                          ]
                        )
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  op_id: Op_DAmp
                )
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [21]
        )
      spids: [17 20]
    )
    (C {(test_expect_success)} {(SQ <setup>)} 
      {
        (SQ <"\n"> <"\techo c0 > c0.c &&\n"> <"\tgit add c0.c &&\n"> <"\tgit commit -m c0 &&\n"> 
          <"\tgit tag c0 &&\n"> <"\techo c1 > c1.c &&\n"> <"\tgit add c1.c &&\n"> <"\tgit commit -m c1 &&\n"> <"\tgit tag c1 &&\n"> 
          <"\tgit reset --hard c0 &&\n"> <"\techo c2 > c2.c &&\n"> <"\tgit add c2.c &&\n"> <"\tgit commit -m c2 &&\n"> <"\tgit tag c2 &&\n"> 
          <"\tcreate_merge_msgs\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"merge c2 with a custom message">)} 
      {
        (SQ <"\n"> <"\tgit reset --hard c1 &&\n"> <"\tgit merge -m \"$(cat exp.subject)\" c2 &&\n"> 
          <"\tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >actual &&\n"> <"\ttest_cmp exp.subject actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"merge --log appends to custom message">)} 
      {
        (SQ <"\n"> <"\tgit reset --hard c1 &&\n"> 
          <"\tgit merge --log -m \"$(cat exp.subject)\" c2 &&\n"> <"\tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >actual &&\n"> <"\ttest_cmp exp.log actual\n">
        )
      }
    )
    (C {(test_done)})
  ]
)