(command.CommandList
  children: [
    (C {<Id.Lit_Colon ':'>} {<included>} {<from>} {<6002>} {<and>} {<others>})
    (C {<mkdir>} {<-p>} {<'.git/refs/tags'>})
    (command.Simple
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<sed.script>})]
      do_fork: F
    )
    (command.ShFunction
      name: tag
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_tag)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [35]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {<-f>} {(DQ <'.git/refs/tags/'> ($ Id.VSub_DollarName '$_tag'))})
                (C {<error>} 
                  {
                    (DQ <'tag: '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                      ($ Id.VSub_DollarName '$_tag') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' does not exist'>
                    )
                  }
                )
              ]
            )
            (C {<cat>} {(DQ <'.git/refs/tags/'> ($ Id.VSub_DollarName '$_tag'))})
          ]
        )
    )
    (command.ShFunction
      name: unique_commit
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_text)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [85]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_tree)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [89]
                )
              ]
            )
            (C {<shift>} {<2>})
            (command.Pipeline
              children: [
                (C {<echo>} {(DQ ($ Id.VSub_DollarName '$_text'))})
                (C {<git>} {<commit-tree>} 
                  {
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      child: (C {<tag>} {(DQ ($ Id.VSub_DollarName '$_tree'))})
                    )
                  } {(DQ ($ Id.VSub_At '$@'))}
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: save_tag
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_tag)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [139]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$_tag'))})
                (C {<error>} {(DQ <'usage: save_tag tag commit-args ...'>)})
              ]
            )
            (C {<shift>} {<1>})
            (command.Simple
              words: [{(DQ ($ Id.VSub_At '$@'))}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(DQ <'.git/refs/tags/'> ($ Id.VSub_DollarName '$_tag'))}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'s/'> 
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      child: (C {<tag>} {($ Id.VSub_DollarName '$_tag')})
                    ) <'/'> ($ Id.VSub_DollarName '$_tag') <'/g'>
                  )
                }
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<sed.script.tmp>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<cat>} {<sed.script>}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<sed.script.tmp>}
                )
              ]
              do_fork: T
            )
            (C {<rm>} {<sed.script>})
            (C {<mv>} {<sed.script.tmp>} {<sed.script>})
          ]
        )
    )
    (command.ShFunction name:entag body:(BraceGroup children:[(C {<sed>} {<-f>} {<sed.script>})]))
    (command.ShFunction
      name: as_author
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_author)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [251]
                )
              ]
            )
            (C {<shift>} {<1>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_save)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$GIT_AUTHOR_EMAIL')}
                  spids: [260]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_EMAIL)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$_author'))}
                  spids: [265]
                )
              ]
            )
            (C {<export>} {<GIT_AUTHOR_EMAIL>})
            (C {(DQ ($ Id.VSub_At '$@'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$_save'))})]
                    )
                  action: [(C {<unset>} {<GIT_AUTHOR_EMAIL>})]
                  spids: [281 292]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_EMAIL)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName '$_save'))}
                      spids: [303]
                    )
                  ]
                )
                (C {<export>} {<GIT_AUTHOR_EMAIL>})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: commit_date
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_commit)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [327]
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {<git>} {<cat-file>} {<commit>} {($ Id.VSub_DollarName '$_commit')})
                (C {<sed>} {<-n>} 
                  {
                    (DQ <'s/^committer .*> '> <Id.Lit_BadBackslash '\\'> <'([0-9]*'> 
                      <Id.Lit_BadBackslash '\\'> <') .*/'> <Id.Lit_BadBackslash '\\'> <'1/p'>
                    )
                  }
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: assign_fake_date
      body: 
        (BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$2'))}
              arms: [
                (case_arm
                  pat_list: [
                    {<Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_Colon ':'> <Id.Lit_QMark '?'> 
                      <Id.Lit_QMark '?'> <Id.Lit_Colon ':'> <Id.Lit_QMark '?'> <Id.Lit_QMark '?'>
                    }
                  ]
                  action: [
                    (C {<eval>} 
                      {(DQ ($ Id.VSub_Number '$1') <'=\'1971-08-16 '> ($ Id.VSub_Number '$2') <'\''>)}
                    )
                  ]
                  spids: [382 390 401 -1]
                )
                (case_arm
                  pat_list: [
                    {<Id.Lit_QMark '?'> <Id.Lit_QMark '?'> <Id.Lit_Colon ':'> <Id.Lit_QMark '?'> 
                      <Id.Lit_QMark '?'>
                    }
                  ]
                  action: [
                    (C {<eval>} 
                      {
                        (DQ ($ Id.VSub_Number '$1') <'=\'1971-08-16 00:'> ($ Id.VSub_Number '$2') <'\''>)
                      }
                    )
                  ]
                  spids: [404 409 420 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_QMark '?'> <Id.Lit_QMark '?'>}]
                  action: [
                    (C {<eval>} 
                      {
                        (DQ ($ Id.VSub_Number '$1') <'=\'1971-08-16 00:00:'> ($ Id.VSub_Number '$2') 
                          <'\''>
                        )
                      }
                    )
                  ]
                  spids: [423 425 436 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<eval>} {(DQ ($ Id.VSub_Number '$1') <'=\''> ($ Id.VSub_Number '$2') <'\''>)})
                  ]
                  spids: [439 440 451 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: on_committer_date
      body: 
        (BraceGroup
          children: [
            (C {<assign_fake_date>} {<GIT_COMMITTER_DATE>} {(DQ ($ Id.VSub_Number '$1'))})
            (C {<export>} {<GIT_COMMITTER_DATE>})
            (C {<shift>} {<1>})
            (C {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShFunction
      name: on_dates
      body: 
        (BraceGroup
          children: [
            (C {<assign_fake_date>} {<GIT_COMMITTER_DATE>} {(DQ ($ Id.VSub_Number '$1'))})
            (C {<assign_fake_date>} {<GIT_AUTHOR_DATE>} {(DQ ($ Id.VSub_Number '$2'))})
            (C {<export>} {<GIT_COMMITTER_DATE>} {<GIT_AUTHOR_DATE>})
            (C {<shift>} {<2>})
            (C {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShFunction
      name: hide_error
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{(DQ ($ Id.VSub_At '$@'))}]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: check_output
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_name)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [567]
                )
              ]
            )
            (C {<shift>} {<1>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [
                            (C {<eval>} {(DQ ($ Id.VSub_Star '$*'))})
                            (command.Simple
                              words: [{<entag>}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {(DQ ($ Id.VSub_DollarName '$_name') <.actual>)}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                  action: [
                    (C {<test_cmp>} {(DQ ($ Id.VSub_DollarName '$_name') <.expected>)} 
                      {(DQ ($ Id.VSub_DollarName '$_name') <.actual>)}
                    )
                  ]
                  spids: [576 595]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: name_from_description
      body: 
        (BraceGroup
          children: [
            (C {<perl>} {<-pe>} 
              {
                (SQ <'\n'> <'\t\ts/[^A-Za-z0-9.]/-/g;\n'> <'\t\ts/-+/-/g;\n'> <'\t\ts/-$//;\n'> 
                  <'\t\ts/^-//;\n'> <'\t\ty/A-Z/a-z/;\n'> <'\t'>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: test_output_expect_success
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_description)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [678]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_test)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [682]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {($ Id.VSub_Pound '$#')} {<-eq>} {<2>})
                (C {<error>} {(DQ <'usage: test_output_expect_success description test <<EOF ... EOF'>)})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_name)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_DollarName '$_description')})
                              (C {<name_from_description>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [705]
                )
              ]
            )
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(DQ ($ Id.VSub_DollarName '$_name') <.expected>)}
                )
              ]
              do_fork: T
            )
            (C {<test_expect_success>} {(DQ ($ Id.VSub_DollarName '$_description'))} 
              {
                (DQ <'check_output '> ($ Id.VSub_DollarName '$_name') <' '> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ($ Id.VSub_DollarName '$_test') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                )
              }
            )
          ]
        )
    )
  ]
)