(command.CommandList
  children: [
    (C {(Id.Lit_Other ':')} {(included)} {(from)} {(6002)} {(and)} {(others)})
    (C {(mkdir)} {(-p)} {(.git/refs/tags)})
    (command.Simple
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:20)
          fd: -1
          arg_word: {(sed.script)}
        )
      ]
    )
    (command.ShFunction
      name: tag
      body: 
        (command.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: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:54)
                      ) ($ Id.VSub_DollarName '$_tag') 
                      (word_part.EscapedLiteral
                        token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:56)
                      ) (' does not exist')
                    )
                  }
                )
              ]
            )
            (C {(cat)} {(DQ (.git/refs/tags/) ($ Id.VSub_DollarName '$_tag'))})
          ]
        )
    )
    (command.ShFunction
      name: unique_commit
      body: 
        (command.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: (Token id:Id.Left_DollarParen val:'$(' span_id:110)
                      command_list: 
                        (command.CommandList
                          children: [(C {(tag)} {(DQ ($ Id.VSub_DollarName '$_tree'))})]
                        )
                    )
                  } {(DQ ($ Id.VSub_At '$@'))}
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: save_tag
      body: 
        (command.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.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:169)
                  fd: -1
                  arg_word: {(DQ (.git/refs/tags/) ($ Id.VSub_DollarName '$_tag'))}
                )
              ]
            )
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ (s/) 
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:181)
                      command_list: 
                        (command.CommandList
                          children: [(C {(tag)} {($ Id.VSub_DollarName '$_tag')})]
                        )
                    ) (/) ($ Id.VSub_DollarName '$_tag') (/g)
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:191)
                  fd: -1
                  arg_word: {(sed.script.tmp)}
                )
              ]
            )
            (command.Simple
              words: [{(cat)} {(sed.script)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_DGreat val:'>>' span_id:199)
                  fd: -1
                  arg_word: {(sed.script.tmp)}
                )
              ]
            )
            (C {(rm)} {(sed.script)})
            (C {(mv)} {(sed.script.tmp)} {(sed.script)})
          ]
        )
    )
    (command.ShFunction
      name: entag
      body: (command.BraceGroup children:[(C {(sed)} {(-f)} {(sed.script)})])
    )
    (command.ShFunction
      name: as_author
      body: 
        (command.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: [(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: 
        (command.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_Other '\\') ('([0-9]*') (Id.Lit_Other '\\') 
                      (') .*/') (Id.Lit_Other '\\') (1/p)
                    )
                  }
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: assign_fake_date
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$2'))}
              arms: [
                (case_arm
                  pat_list: [
                    {(Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_Other ':') (Id.Lit_QMark '?') 
                      (Id.Lit_QMark '?') (Id.Lit_Other ':') (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_Other ':') (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: 
        (command.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: 
        (command.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: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(DQ ($ Id.VSub_At '$@'))}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'2>' span_id:553)
                  fd: 2
                  arg_word: {(/dev/null)}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_output
      body: 
        (command.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: [
                    (command.Pipeline
                      children: [
                        (C {(eval)} {(DQ ($ Id.VSub_Star '$*'))})
                        (command.Simple
                          words: [{(entag)}]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_Great val:'>' span_id:588)
                              fd: -1
                              arg_word: {(DQ ($ Id.VSub_DollarName '$_name') (.actual))}
                            )
                          ]
                        )
                      ]
                      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: (Token id:Id.ControlFlow_Return val:return span_id:614)
                  arg_word: {(1)}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: name_from_description
      body: 
        (command.BraceGroup
          children: [
            (C {(perl)} {(-pe)} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:646) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ts/[^A-Za-z0-9.]/-/g;\n'
                    span_id: 647
                  ) (Token id:Id.Lit_Chars val:'\t\ts/-+/-/g;\n' span_id:648) 
                  (Token id:Id.Lit_Chars val:'\t\ts/-$//;\n' span_id:649) (Token id:Id.Lit_Chars val:'\t\ts/^-//;\n' span_id:650) 
                  (Token id:Id.Lit_Chars val:'\t\ty/A-Z/a-z/;\n' span_id:651) (Token id:Id.Lit_Chars val:'\t' span_id:652)
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: test_output_expect_success
      body: 
        (command.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: (Token id:Id.Left_DollarParen val:'$(' span_id:706)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {($ Id.VSub_DollarName '$_description')})
                                  (C {(name_from_description)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [705]
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:719)
                  fd: -1
                  arg_word: {(DQ ($ Id.VSub_DollarName '$_name') (.expected))}
                )
              ]
            )
            (C {(test_expect_success)} {(DQ ($ Id.VSub_DollarName '$_description'))} 
              {
                (DQ ('check_output ') ($ Id.VSub_DollarName '$_name') (' ') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:736)
                  ) ($ Id.VSub_DollarName '$_test') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:738)
                  )
                )
              }
            )
          ]
        )
    )
  ]
)