(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[12])
          op: Equal
          rhs: {(SQ <'verbose commit template'>)}
          spids: [12]
        )
      ]
      spids: [12]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.SimpleCommand
          words: [{(write_script)} {(DQ (check-for-diff))}]
          redirects: [
            (redir.HereDoc
              op: <Redir_DLess '<<'>
              fd: 16777215
              here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
              here_end_span_id: 36
              stdin_parts: [('grep \'^diff --git\' "$1" >out\n') ('exit 0\n')]
            )
          ]
        )
        (C {(test_set_editor)} {(DQ ($ VSub_Name '$PWD') (/check-for-diff))})
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(message)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 58
          stdin_parts: [('subject\n') ('\n') ('body\n')]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <setup>)} 
      {
        (SQ <'\n'> <'\techo content >file &&\n'> <'\tgit add file &&\n'> <'\tgit commit -F message\n'>)
      }
    )
    (C {(test_expect_success)} {(SQ <'initial commit shows verbose diff'>)} 
      {(SQ <'\n'> <'\tgit commit --amend -v &&\n'> <'\ttest_line_count = 1 out\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'second commit'>)} 
      {
        (SQ <'\n'> <'\techo content modified >file &&\n'> <'\tgit add file &&\n'> 
          <'\tgit commit -F message\n'>
        )
      }
    )
    (command.FuncDef
      name: check_message
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.SimpleCommand
                  words: [
                    {(git)}
                    {(log)}
                    {(-1)}
                    {(--pretty) (Lit_Other '=') (format) (Lit_Other ':') (Lit_Other '%') (s) 
                      (Lit_Other '%') (n) (Lit_Other '%') (n) (Lit_Other '%') (b)
                    }
                  ]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(actual)})]
                )
                (C {(test_cmp)} {(DQ ($ VSub_Number '$1'))} {(actual)})
              ]
            )
          ]
          spids: [105]
        )
      spids: [101 104]
    )
    (C {(test_expect_success)} {(SQ <'verbose diff is stripped out'>)} 
      {
        (SQ <'\n'> <'\tgit commit --amend -v &&\n'> <'\tcheck_message message &&\n'> 
          <'\ttest_line_count = 1 out\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'verbose diff is stripped out (mnemonicprefix)'>)} 
      {
        (SQ <'\n'> <'\tgit config diff.mnemonicprefix true &&\n'> <'\tgit commit --amend -v &&\n'> 
          <'\tcheck_message message &&\n'> <'\ttest_line_count = 1 out\n'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(diff)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 192
          stdin_parts: [
            ('This is an example commit message that contains a diff.\n')
            ('\n')
            ('diff --git c/file i/file\n')
            ('new file mode 100644\n')
            ('index 0000000..f95c11d\n')
            ('--- /dev/null\n')
            ('+++ i/file\n')
            ('@@ -0,0 +1 @@\n')
            ('+this is some content\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff in message is retained without -v'>)} 
      {(SQ <'\n'> <'\tgit commit --amend -F diff &&\n'> <'\tcheck_message diff\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'diff in message is retained with -v'>)} 
      {(SQ <'\n'> <'\tgit commit --amend -F diff -v &&\n'> <'\tcheck_message diff\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'submodule log is stripped out too with -v'>)} 
      {
        (SQ <'\n'> <'\tgit config diff.submodule log &&\n'> <'\tgit submodule add ./. sub &&\n'> 
          <'\tgit commit -m "sub added" &&\n'> <'\t(\n'> <'\t\tcd sub &&\n'> <'\t\techo "more" >>file &&\n'> 
          <'\t\tgit commit -a -m "submodule commit"\n'> <'\t) &&\n'> <'\t(\n'> <'\t\tGIT_EDITOR=cat &&\n'> <'\t\texport GIT_EDITOR &&\n'> 
          <'\t\ttest_must_fail git commit -a -v 2>err\n'> <'\t) &&\n'> <'\ttest_i18ngrep "Aborting commit due to empty commit message." err\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'verbose diff is stripped out with set core.commentChar'>)} 
      {
        (SQ <'\n'> <'\t(\n'> <'\t\tGIT_EDITOR=cat &&\n'> <'\t\texport GIT_EDITOR &&\n'> 
          <'\t\ttest_must_fail git -c core.commentchar=";" commit -a -v 2>err\n'> <'\t) &&\n'> <'\ttest_i18ngrep "Aborting commit due to empty commit message." err\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'status does not verbose without --verbose'>)} 
      {(SQ <'\n'> <'\tgit status >actual &&\n'> <'\t! grep "^diff --git" actual\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'setup -v -v'>)} {(SQ <'\n'> <'\techo dirty >file\n'>)})
    (command.ForEach
      iter_name: i
      iter_words: [{(true)} {(1)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {(DQ ('commit.verbose=') ($ VSub_Name '$i') (' and --verbose omitted'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ VSub_Name '$i') (' commit --amend &&\n') 
                  ('\t\ttest_line_count = 1 out\n') ('\t')
                )
              }
            )
          ]
          spids: [297 317]
        )
      spids: [292 16777215]
    )
    (command.ForEach
      iter_name: i
      iter_words: [{(false)} {(-2)} {(-1)} {(0)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {(DQ ('commit.verbose=') ($ VSub_Name '$i') (' and --verbose omitted'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ VSub_Name '$i') (' commit --amend &&\n') 
                  ('\t\ttest_line_count = 0 out\n') ('\t')
                )
              }
            )
          ]
          spids: [334 354]
        )
      spids: [325 16777215]
    )
    (command.ForEach
      iter_name: i
      iter_words: [{(2)} {(3)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {(DQ ('commit.verbose=') ($ VSub_Name '$i') (' and --verbose omitted'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ VSub_Name '$i') (' commit --amend &&\n') 
                  ('\t\ttest_line_count = 2 out\n') ('\t')
                )
              }
            )
          ]
          spids: [367 387]
        )
      spids: [362 16777215]
    )
    (command.ForEach
      iter_name: i
      iter_words: [{(true)} {(false)} {(-2)} {(-1)} {(0)} {(1)} {(2)} {(3)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ('commit.verbose=') ($ VSub_Name '$i') (' and --verbose'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ VSub_Name '$i') 
                  (' commit --amend --verbose &&\n') ('\t\ttest_line_count = 1 out\n') ('\t')
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ ('commit.verbose=') ($ VSub_Name '$i') (' and --no-verbose'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ VSub_Name '$i') 
                  (' commit --amend --no-verbose &&\n') ('\t\ttest_line_count = 0 out\n') ('\t')
                )
              }
            )
            (C {(test_expect_success)} {(DQ ('commit.verbose=') ($ VSub_Name '$i') (' and -v -v'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ VSub_Name '$i') 
                  (' commit --amend -v -v &&\n') ('\t\ttest_line_count = 2 out\n') ('\t')
                )
              }
            )
          ]
          spids: [412 470]
        )
      spids: [395 16777215]
    )
    (C {(test_expect_success)} {(DQ ('status ignores commit.verbose=true'))} 
      {
        (SQ <'\n'> <'\tgit -c commit.verbose=true status >actual &&\n'> 
          <'\t! grep "^diff --git actual"\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)