(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'test_description='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'test_description='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git commit --reset-author'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <author_header>
      name: author_header
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<cat-file>} {<commit>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <sed>
                  more_env: []
                  words: [{<sed>} {<-n>} {<-e>} {(SQ <'/^$/q'>)} {<-e>} {(SQ <'/^author /p'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <message_body>
      name: message_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<cat-file>} {<commit>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <sed>
                  more_env: []
                  words: [{<sed>} {<-e>} {(SQ <'1,/^$/d'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'-C option copies authorship and message'>)}
        {
          (SQ <'\n'> <'\techo "Initial" >foo &&\n'> <'\tgit add foo &&\n'> <'\ttest_tick &&\n'> 
            <'\tgit commit -m "Initial Commit" --author Frigate\\ \\<flying@over.world\\> &&\n'> <'\tgit tag Initial &&\n'> <'\techo "Test 1" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\tgit commit -a -C Initial &&\n'> <'\tauthor_header Initial >expect &&\n'> <'\tauthor_header HEAD >actual &&\n'> 
            <'\ttest_cmp expect actual &&\n'> <'\n'> <'\tmessage_body Initial >expect &&\n'> <'\tmessage_body HEAD >actual &&\n'> 
            <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'-C option copies only the message with --reset-author'>)}
        {
          (SQ <'\n'> <'\techo "Test 2" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\tgit commit -a -C Initial --reset-author &&\n'> <'\techo "author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> $GIT_AUTHOR_DATE" >expect &&\n'> 
            <'\tauthor_header HEAD >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\tmessage_body Initial >expect &&\n'> 
            <'\tmessage_body HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'-c option copies authorship and message'>)}
        {
          (SQ <'\n'> <'\techo "Test 3" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\tEDITOR=: VISUAL=: git commit -a -c Initial &&\n'> <'\tauthor_header Initial >expect &&\n'> <'\tauthor_header HEAD >actual &&\n'> 
            <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'-c option copies only the message with --reset-author'>)}
        {
          (SQ <'\n'> <'\techo "Test 4" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\tEDITOR=: VISUAL=: git commit -a -c Initial --reset-author &&\n'> <'\techo "author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> $GIT_AUTHOR_DATE" >expect &&\n'> 
            <'\tauthor_header HEAD >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\tmessage_body Initial >expect &&\n'> 
            <'\tmessage_body HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--amend option copies authorship'>)}
        {
          (SQ <'\n'> <'\tgit checkout Initial &&\n'> <'\techo "Test 5" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\tgit commit -a --amend -m "amend test" &&\n'> <'\tauthor_header Initial >expect &&\n'> <'\tauthor_header HEAD >actual &&\n'> 
            <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo "amend test" >expect &&\n'> <'\tmessage_body HEAD >actual &&\n'> 
            <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <sha1_file>
      name: sha1_file
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {(DQ ($ Id.VSub_Star '*'))}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <sed>
                  more_env: []
                  words: [{<sed>} {(DQ <'s#..#.git/objects/&/#'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <remove_object>
      name: remove_object
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <rm>
              more_env: []
              words: [
                {<rm>}
                {<-f>}
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <sha1_file>
                        more_env: []
                        words: [{<sha1_file>} {(DQ ($ Id.VSub_Star '*'))}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--amend option with empty author'>)}
        {
          (SQ <'\n'> <'\tgit cat-file commit Initial >tmp &&\n'> 
            <'\tsed "s/author [^<]* </author  </" tmp >empty-author &&\n'> <'\tsha=$(git hash-object -t commit -w empty-author) &&\n'> 
            <'\ttest_when_finished "remove_object $sha" &&\n'> <'\tgit checkout $sha &&\n'> <'\ttest_when_finished "git checkout Initial" &&\n'> 
            <'\techo "Empty author test" >>foo &&\n'> <'\ttest_tick &&\n'> <'\ttest_must_fail git commit -a -m "empty author" --amend 2>err &&\n'> 
            <'\tgrep "empty ident" err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--amend option with missing author'>)}
        {
          (SQ <'\n'> <'\tgit cat-file commit Initial >tmp &&\n'> 
            <'\tsed "s/author [^<]* </author </" tmp >malformed &&\n'> <'\tsha=$(git hash-object -t commit -w malformed) &&\n'> 
            <'\ttest_when_finished "remove_object $sha" &&\n'> <'\tgit checkout $sha &&\n'> <'\ttest_when_finished "git checkout Initial" &&\n'> 
            <'\techo "Missing author test" >>foo &&\n'> <'\ttest_tick &&\n'> <'\ttest_must_fail git commit -a -m "malformed author" --amend 2>err &&\n'> 
            <'\tgrep "empty ident" err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--reset-author makes the commit ours even with --amend option'>)}
        {
          (SQ <'\n'> <'\tgit checkout Initial &&\n'> <'\techo "Test 6" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\tgit commit -a --reset-author -m "Changed again" --amend &&\n'> <'\techo "author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> $GIT_AUTHOR_DATE" >expect &&\n'> 
            <'\tauthor_header HEAD >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo "Changed again" >expect &&\n'> 
            <'\tmessage_body HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--reset-author and --author are mutually exclusive'>)}
        {
          (SQ <'\n'> <'\tgit checkout Initial &&\n'> <'\techo "Test 7" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\ttest_must_fail git commit -a --reset-author --author="Xyzzy <frotz@nitfol.xz>"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--reset-author should be rejected without -c/-C/--amend'>)}
        {
          (SQ <'\n'> <'\tgit checkout Initial &&\n'> <'\techo "Test 7" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\ttest_must_fail git commit -a --reset-author -m done\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'commit respects CHERRY_PICK_HEAD and MERGE_MSG'>)}
        {
          (SQ <'\n'> <'\techo "cherry-pick 1a" >>foo &&\n'> <'\ttest_tick &&\n'> 
            <'\tgit commit -am "cherry-pick 1" --author="Cherry <cherry@pick.er>" &&\n'> <'\tgit tag cherry-pick-head &&\n'> <'\tgit rev-parse cherry-pick-head >.git/CHERRY_PICK_HEAD &&\n'> 
            <'\techo "This is a MERGE_MSG" >.git/MERGE_MSG &&\n'> <'\techo "cherry-pick 1b" >>foo &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -a &&\n'> 
            <'\tauthor_header cherry-pick-head >expect &&\n'> <'\tauthor_header HEAD >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> 
            <'\techo "This is a MERGE_MSG" >expect &&\n'> <'\tmessage_body HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--reset-author with CHERRY_PICK_HEAD'>)}
        {
          (SQ <'\n'> <'\tgit rev-parse cherry-pick-head >.git/CHERRY_PICK_HEAD &&\n'> 
            <'\techo "cherry-pick 2" >>foo &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -am "cherry-pick 2" --reset-author &&\n'> 
            <'\techo "author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> $GIT_AUTHOR_DATE" >expect &&\n'> <'\tauthor_header HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)