(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {(DQ ($ Id.VSub_Number 1))} {<Id.Lit_Equals '='>} 
                      {(DQ <'testgit::'> ($ Id.VSub_Number 2))}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'alias='> name:alias)
                  op: assign_op.Equal
                  rhs: {<Id.Lit_Underscore _>}
                  spids: [32]
                )
              ]
              redirects: []
            )
          ]
          spids: [13 29]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'alias='> name:alias)
              op: assign_op.Equal
              rhs: {($ Id.VSub_Number 1)}
              spids: [38]
            )
          ]
          redirects: []
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'url='> name:url)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 2)}
          spids: [43]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dir='> name:dir)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName GIT_DIR) <'/testgit/'> ($ Id.VSub_DollarName alias))}
          spids: [47]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prefix='> name:prefix)
          op: assign_op.Equal
          rhs: {(DQ <'refs/testgit/'> ($ Id.VSub_DollarName alias))}
          spids: [54]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'default_refspec='> name:default_refspec)
          op: assign_op.Equal
          rhs: {(DQ <'refs/heads/*:'> (${ Id.VSub_Name prefix) <'/heads/*'>)}
          spids: [61]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'refspec='> name:refspec)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  left: <Id.Left_DollarBrace '${'>
                  token: <Id.VSub_Name GIT_REMOTE_TESTGIT_REFSPEC>
                  var_name: GIT_REMOTE_TESTGIT_REFSPEC
                  suffix_op: 
                    (suffix_op.Unary
                      op: <Id.VTest_Hyphen _>
                      arg_word: {($ Id.VSub_DollarName default_refspec)}
                    )
                  right: <Id.Right_DollarBrace '}'>
                )
              )
            }
          spids: [71]
        )
      ]
      redirects: []
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName refspec))})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prefix='> name:prefix)
              op: assign_op.Equal
              rhs: {(DQ <refs>)}
              spids: [91]
            )
          ]
          redirects: []
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'GIT_DIR='> name:GIT_DIR)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName url) <'/.git'>)}
          spids: [97]
        )
      ]
      redirects: []
    )
    (C {<export>} {<GIT_DIR>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'force='> name:force)
          op: assign_op.Equal
          rhs: (rhs_word.Empty)
          spids: [108]
        )
      ]
      redirects: []
    )
    (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName dir))})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName GIT_REMOTE_TESTGIT_NO_MARKS))})]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'gitmarks='> name:gitmarks)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName dir) <'/git.marks'>)}
                  spids: [133]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'testgitmarks='> name:testgitmarks)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName dir) <'/testgit.marks'>)}
                  spids: [140]
                )
              ]
              redirects: []
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {<-e>} {(DQ ($ Id.VSub_DollarName gitmarks))})
                (command.Simple
                  words: []
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(DQ ($ Id.VSub_DollarName gitmarks))}
                    )
                  ]
                  more_env: []
                  do_fork: F
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {<-e>} {(DQ ($ Id.VSub_DollarName testgitmarks))})
                (command.Simple
                  words: []
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(DQ ($ Id.VSub_DollarName testgitmarks))}
                    )
                  ]
                  more_env: []
                  do_fork: F
                )
              ]
            )
          ]
          spids: [120 130]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: (condition.Shell commands:[(C {<read>} {<line>})])
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName line)}
              arms: [
                (case_arm
                  pat_list: [{<capabilities>}]
                  action: [
                    (C {<echo>} {(SQ <import>)})
                    (C {<echo>} {(SQ <export>)})
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName refspec))})
                        (C {<echo>} {(DQ <'refspec '> ($ Id.VSub_DollarName refspec))})
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [(C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName gitmarks))})]
                            )
                          action: [
                            (C {<echo>} {(DQ <'*import-marks '> ($ Id.VSub_DollarName gitmarks))})
                            (C {<echo>} {(DQ <'*export-marks '> ($ Id.VSub_DollarName gitmarks))})
                          ]
                          spids: [233 244]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName GIT_REMOTE_TESTGIT_SIGNED_TAGS))})
                        (C {<echo>} {(DQ <signed-tags>)})
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<test>} {<-n>} 
                          {(DQ ($ Id.VSub_DollarName GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE))}
                        )
                        (C {<echo>} {(DQ <no-private-update>)})
                      ]
                    )
                    (C {<echo>} {(SQ <option>)})
                    (C {<echo>})
                  ]
                  spids: [197 198 310 -1]
                )
                (case_arm
                  pat_list: [{<list>}]
                  action: [
                    (C {<git>} {<for-each-ref>} {<--format> <Id.Lit_Equals '='> (SQ <'? %(refname)'>)} 
                      {(SQ <'refs/heads/'>)}
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head='> name:head)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<git>} {<symbolic-ref>} {<HEAD>})
                                right: <Id.Eof_RParen _>
                              )
                            }
                          spids: [332]
                        )
                      ]
                      redirects: []
                    )
                    (C {<echo>} {(DQ <'@'> ($ Id.VSub_DollarName head) <' HEAD'>)})
                    (C {<echo>})
                  ]
                  spids: [313 314 354 -1]
                )
                (case_arm
                  pat_list: [{<Id.KW_Import import> <Id.Lit_Star '*'>}]
                  action: [
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: (condition.Shell commands:[(C {<true>})])
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          left: <Id.Left_DollarBrace '${'>
                                          token: <Id.VSub_Name line>
                                          var_name: line
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op: <Id.VOp1_Pound '#'>
                                              arg_word: {<Id.Lit_Other '*'> <' '>}
                                            )
                                          right: <Id.Right_DollarBrace '}'>
                                        )
                                      )
                                    }
                                  spids: [374]
                                )
                              ]
                              redirects: []
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'refs='> name:refs)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName refs) <' '> ($ Id.VSub_DollarName ref))
                                    }
                                  spids: [385]
                                )
                              ]
                              redirects: []
                            )
                            (C {<read>} {<line>})
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<test>} 
                                  {
                                    (DQ 
                                      (braced_var_sub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Name line>
                                        var_name: line
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op: <Id.VOp1_DPercent '%%'>
                                            arg_word: {<' '> <Id.Lit_Other '*'>}
                                          )
                                        right: <Id.Right_DollarBrace '}'>
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <import>)}
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Break break>
                                )
                              ]
                            )
                          ]
                        )
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [(C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName gitmarks))})]
                            )
                          action: [
                            (C {<echo>} {(DQ <'feature import-marks='> ($ Id.VSub_DollarName gitmarks))})
                            (C {<echo>} {(DQ <'feature export-marks='> ($ Id.VSub_DollarName gitmarks))})
                          ]
                          spids: [425 436]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<test>} {<-n>} 
                                  {(DQ ($ Id.VSub_DollarName GIT_REMOTE_TESTGIT_FAILURE))}
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} {(DQ <'feature done'>)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [459 470]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (C {<echo>} {(DQ <'feature done'>)})
                    (command.Pipeline
                      children: [
                        (C {<git>} {<fast-export>} 
                          {
                            (braced_var_sub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Name testgitmarks>
                              var_name: testgitmarks
                              suffix_op: 
                                (suffix_op.Unary
                                  op: <Id.VTest_ColonPlus _>
                                  arg_word: 
                                    {(DQ <'--import-marks='> ($ Id.VSub_DollarName testgitmarks))}
                                )
                              right: <Id.Right_DollarBrace '}'>
                            )
                          } 
                          {
                            (braced_var_sub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Name testgitmarks>
                              var_name: testgitmarks
                              suffix_op: 
                                (suffix_op.Unary
                                  op: <Id.VTest_ColonPlus _>
                                  arg_word: 
                                    {(DQ <'--export-marks='> ($ Id.VSub_DollarName testgitmarks))}
                                )
                              right: <Id.Right_DollarBrace '}'>
                            )
                          } {($ Id.VSub_DollarName refs)}
                        )
                        (C {<sed>} {<-e>} 
                          {(DQ <'s#refs/heads/#'> (${ Id.VSub_Name prefix) <'/heads/#g'>)}
                        )
                      ]
                      negated: F
                      stderr_indices: []
                    )
                    (C {<echo>} {(DQ <done>)})
                  ]
                  spids: [357 359 549 -1]
                )
                (case_arm
                  pat_list: [{<export>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<test>} {<-n>} 
                                  {(DQ ($ Id.VSub_DollarName GIT_REMOTE_TESTGIT_FAILURE))}
                                )
                              ]
                            )
                          action: [
                            (command.WhileUntil
                              keyword: <Id.KW_While while>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: (C {<read>} {<line>})
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.AndOr
                                      ops: [Id.Op_DAmp]
                                      children: [
                                        (C {<test>} {(DQ <done>)} {<Id.Lit_Equals '='>} 
                                          {(DQ ($ Id.VSub_DollarName line))}
                                        )
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Break break>
                                        )
                                      ]
                                    )
                                  ]
                                )
                              redirects: []
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [556 567]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'before='> name:before)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<git>} {<for-each-ref>} 
                                    {<--format> <Id.Lit_Equals '='> (SQ <' %(refname) %(objectname) '>)}
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                          spids: [625]
                        )
                      ]
                      redirects: []
                    )
                    (C {<git>} {<fast-import>} 
                      {
                        (braced_var_sub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name force>
                          var_name: force
                          suffix_op: (suffix_op.Unary op:<Id.VTest_ColonPlus _> arg_word:{<--force>})
                          right: <Id.Right_DollarBrace '}'>
                        )
                      } 
                      {
                        (braced_var_sub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name testgitmarks>
                          var_name: testgitmarks
                          suffix_op: 
                            (suffix_op.Unary
                              op: <Id.VTest_ColonPlus _>
                              arg_word: {(DQ <'--import-marks='> ($ Id.VSub_DollarName testgitmarks))}
                            )
                          right: <Id.Right_DollarBrace '}'>
                        )
                      } 
                      {
                        (braced_var_sub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name testgitmarks>
                          var_name: testgitmarks
                          suffix_op: 
                            (suffix_op.Unary
                              op: <Id.VTest_ColonPlus _>
                              arg_word: {(DQ <'--export-marks='> ($ Id.VSub_DollarName testgitmarks))}
                            )
                          right: <Id.Right_DollarBrace '}'>
                        )
                      } {<--quiet>}
                    )
                    (command.Pipeline
                      children: [
                        (C {<git>} {<for-each-ref>} 
                          {<--format> <Id.Lit_Equals '='> (SQ <'%(refname) %(objectname)'>)}
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: (condition.Shell commands:[(C {<read>} {<ref>} {<a>})])
                          body: 
                            (command.DoGroup
                              children: [
                                (command.Case
                                  to_match: {(DQ ($ Id.VSub_DollarName before))}
                                  arms: [
                                    (case_arm
                                      pat_list: [
                                        {<Id.Lit_Star '*'> 
                                          (DQ <' '> ($ Id.VSub_DollarName ref) <' '> 
                                            ($ Id.VSub_DollarName a) <' '>
                                          ) <Id.Lit_Star '*'>
                                        }
                                      ]
                                      action: [
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Continue continue>
                                        )
                                      ]
                                      spids: [718 727 732 -1]
                                    )
                                  ]
                                  redirects: []
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (C {<test>} {<-z>} 
                                              {
                                                (DQ 
                                                  ($ Id.VSub_DollarName GIT_REMOTE_TESTGIT_PUSH_ERROR)
                                                )
                                              }
                                            )
                                          ]
                                        )
                                      action: [(C {<echo>} {(DQ <'ok '> ($ Id.VSub_DollarName ref))})]
                                      spids: [741 752]
                                    )
                                  ]
                                  else_action: [
                                    (C {<echo>} 
                                      {
                                        (DQ <'error '> ($ Id.VSub_DollarName ref) <' '> 
                                          ($ Id.VSub_DollarName GIT_REMOTE_TESTGIT_PUSH_ERROR)
                                        )
                                      }
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                            )
                          redirects: []
                        )
                      ]
                      negated: F
                      stderr_indices: []
                    )
                    (C {<echo>})
                  ]
                  spids: [552 553 786 -1]
                )
                (case_arm
                  pat_list: [
                    {<option> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\ '> ch:' ') 
                      <Id.Lit_Star '*'>
                    }
                  ]
                  action: [
                    (command.Simple
                      words: [{<read>} {<cmd>} {<opt>} {<val>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_DLessDash '<<-'>
                          loc: (redir_loc.Fd fd:0)
                          arg: 
                            (redir_param.HereDoc
                              here_begin: {<EOF>}
                              here_end_span_id: 809
                              stdin_parts: [($ Id.VSub_DollarName line) <'\n'>]
                            )
                        )
                      ]
                      more_env: []
                      do_fork: T
                    )
                    (command.Case
                      to_match: {($ Id.VSub_DollarName opt)}
                      arms: [
                        (case_arm
                          pat_list: [{<force>}]
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DAmp Id.Op_DPipe]
                              children: [
                                (C {<test>} {($ Id.VSub_DollarName val)} {<Id.Lit_Equals '='>} 
                                  {(DQ <true>)}
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'force='>
                                          name: force
                                        )
                                      op: assign_op.Equal
                                      rhs: {(DQ <true>)}
                                      spids: [834]
                                    )
                                  ]
                                  redirects: []
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'force='>
                                          name: force
                                        )
                                      op: assign_op.Equal
                                      rhs: (rhs_word.Empty)
                                      spids: [841]
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                            )
                            (C {<echo>} {(DQ <ok>)})
                          ]
                          spids: [818 819 851 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(C {<echo>} {(DQ <unsupported>)})]
                          spids: [854 855 865 -1]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [789 792 871 -1]
                )
                (case_arm
                  pat_list: [{(SQ )}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit>)]
                  spids: [874 876 882 -1]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
  ]
)