(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:'verbose commit template' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.Simple
          words: [{(write_script)} {(DQ (check-for-diff))}]
          redirects: [
            (redir.HereDoc
              op: (Token id:Id.Redir_DLess val:'<<' span_id:20)
              fd: -1
              here_begin: 
                {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:21)) 
                  (OF)
                }
              here_end_span_id: 28
              stdin_parts: [('grep \'^diff --git\' "$1" >out\n') ('exit 0\n')]
            )
          ]
        )
        (C {(test_set_editor)} {(DQ ($ Id.VSub_DollarName '$PWD') (/check-for-diff))})
      ]
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:39)
          fd: -1
          arg_word: {(message)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:42)
          fd: -1
          here_begin: {(SQ (Token id:Id.Lit_Chars val:EOF span_id:44))}
          here_end_span_id: 50
          stdin_parts: [('subject\n') ('\n') ('body\n')]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:setup span_id:55))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:59) 
          (Token id:Id.Lit_Chars val:'\techo content >file &&\n' span_id:60) (Token id:Id.Lit_Chars val:'\tgit add file &&\n' span_id:61) 
          (Token id:Id.Lit_Chars val:'\tgit commit -F message\n' span_id:62)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'initial commit shows verbose diff' span_id:69))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:73) 
          (Token id:Id.Lit_Chars val:'\tgit commit --amend -v &&\n' span_id:74) (Token id:Id.Lit_Chars val:'\ttest_line_count = 1 out\n' span_id:75)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'second commit' span_id:82))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:86) 
          (Token id:Id.Lit_Chars val:'\techo content modified >file &&\n' span_id:87) (Token id:Id.Lit_Chars val:'\tgit add file &&\n' span_id:88) 
          (Token id:Id.Lit_Chars val:'\tgit commit -F message\n' span_id:89)
        )
      }
    )
    (command.ShFunction
      name: check_message
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.Simple
                  words: [
                    {(git)}
                    {(log)}
                    {(-1)}
                    {(--pretty) (Id.Lit_Equals '=') (format) (Id.Lit_Other ':') (Id.Lit_Other '%') (s) 
                      (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (b)
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:119)
                      fd: -1
                      arg_word: {(actual)}
                    )
                  ]
                )
                (C {(test_cmp)} {(DQ ($ Id.VSub_Number '$1'))} {(actual)})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verbose diff is stripped out' span_id:139))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:143) 
          (Token id:Id.Lit_Chars val:'\tgit commit --amend -v &&\n' span_id:144) (Token id:Id.Lit_Chars val:'\tcheck_message message &&\n' span_id:145) 
          (Token id:Id.Lit_Chars val:'\ttest_line_count = 1 out\n' span_id:146)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verbose diff is stripped out (mnemonicprefix)' span_id:153))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:157) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config diff.mnemonicprefix true &&\n'
            span_id: 158
          ) (Token id:Id.Lit_Chars val:'\tgit commit --amend -v &&\n' span_id:159) 
          (Token id:Id.Lit_Chars val:'\tcheck_message message &&\n' span_id:160) (Token id:Id.Lit_Chars val:'\ttest_line_count = 1 out\n' span_id:161)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:167) fd:-1 arg_word:{(diff)})
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:170)
          fd: -1
          here_begin: {(SQ (Token id:Id.Lit_Chars val:EOF span_id:172))}
          here_end_span_id: 184
          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 (Token id:Id.Lit_Chars val:'diff in message is retained without -v' span_id:189))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:193) 
          (Token id:Id.Lit_Chars val:'\tgit commit --amend -F diff &&\n' span_id:194) (Token id:Id.Lit_Chars val:'\tcheck_message diff\n' span_id:195)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'diff in message is retained with -v' span_id:202))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:206) 
          (Token id:Id.Lit_Chars val:'\tgit commit --amend -F diff -v &&\n' span_id:207) (Token id:Id.Lit_Chars val:'\tcheck_message diff\n' span_id:208)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'submodule log is stripped out too with -v' span_id:215))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:219) 
          (Token id:Id.Lit_Chars val:'\tgit config diff.submodule log &&\n' span_id:220) (Token id:Id.Lit_Chars val:'\tgit submodule add ./. sub &&\n' span_id:221) 
          (Token id:Id.Lit_Chars val:'\tgit commit -m "sub added" &&\n' span_id:222) (Token id:Id.Lit_Chars val:'\t(\n' span_id:223) 
          (Token id:Id.Lit_Chars val:'\t\tcd sub &&\n' span_id:224) (Token id:Id.Lit_Chars val:'\t\techo "more" >>file &&\n' span_id:225) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit commit -a -m "submodule commit"\n'
            span_id: 226
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:227) (Token id:Id.Lit_Chars val:'\t(\n' span_id:228) 
          (Token id:Id.Lit_Chars val:'\t\tGIT_EDITOR=cat &&\n' span_id:229) (Token id:Id.Lit_Chars val:'\t\texport GIT_EDITOR &&\n' span_id:230) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git commit -a -v 2>err\n'
            span_id: 231
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:232) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_i18ngrep "Aborting commit due to empty commit message." err\n'
            span_id: 233
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'verbose diff is stripped out with set core.commentChar'
            span_id: 240
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:244) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:245) (Token id:Id.Lit_Chars val:'\t\tGIT_EDITOR=cat &&\n' span_id:246) 
          (Token id:Id.Lit_Chars val:'\t\texport GIT_EDITOR &&\n' span_id:247) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git -c core.commentchar=";" commit -a -v 2>err\n'
            span_id: 248
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:249) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_i18ngrep "Aborting commit due to empty commit message." err\n'
            span_id: 250
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'status does not verbose without --verbose' span_id:257))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:261) 
          (Token id:Id.Lit_Chars val:'\tgit status >actual &&\n' span_id:262) (Token id:Id.Lit_Chars val:'\t! grep "^diff --git" actual\n' span_id:263)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup -v -v' span_id:270))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:274) 
          (Token id:Id.Lit_Chars val:'\techo dirty >file\n' span_id:275)
        )
      }
    )
    (command.ForEach
      iter_name: i
      iter_words: [{(true)} {(1)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {(DQ ('commit.verbose=') ($ Id.VSub_DollarName '$i') (' and --verbose omitted'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ Id.VSub_DollarName '$i') 
                  (' commit --amend &&\n') ('\t\ttest_line_count = 1 out\n') ('\t')
                )
              }
            )
          ]
        )
    )
    (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=') ($ Id.VSub_DollarName '$i') (' and --verbose omitted'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ Id.VSub_DollarName '$i') 
                  (' commit --amend &&\n') ('\t\ttest_line_count = 0 out\n') ('\t')
                )
              }
            )
          ]
        )
    )
    (command.ForEach
      iter_name: i
      iter_words: [{(2)} {(3)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {(DQ ('commit.verbose=') ($ Id.VSub_DollarName '$i') (' and --verbose omitted'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ Id.VSub_DollarName '$i') 
                  (' commit --amend &&\n') ('\t\ttest_line_count = 2 out\n') ('\t')
                )
              }
            )
          ]
        )
    )
    (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=') ($ Id.VSub_DollarName '$i') (' and --verbose'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ Id.VSub_DollarName '$i') 
                  (' commit --amend --verbose &&\n') ('\t\ttest_line_count = 1 out\n') ('\t')
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ ('commit.verbose=') ($ Id.VSub_DollarName '$i') (' and --no-verbose'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ Id.VSub_DollarName '$i') 
                  (' commit --amend --no-verbose &&\n') ('\t\ttest_line_count = 0 out\n') ('\t')
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ ('commit.verbose=') ($ Id.VSub_DollarName '$i') (' and -v -v'))} 
              {
                (DQ ('\n') ('\t\tgit -c commit.verbose=') ($ Id.VSub_DollarName '$i') 
                  (' commit --amend -v -v &&\n') ('\t\ttest_line_count = 2 out\n') ('\t')
                )
              }
            )
          ]
        )
    )
    (C {(test_expect_success)} {(DQ ('status ignores commit.verbose=true'))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:472) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -c commit.verbose=true status >actual &&\n'
            span_id: 473
          ) (Token id:Id.Lit_Chars val:'\t! grep "^diff --git actual"\n' span_id:474)
        )
      }
    )
    (C {(test_done)})
  ]
)