(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(test)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} 
                  {(DQ ('testgit::') ($ VSub_Number '$2'))}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:alias spids:[32])
                  op: Equal
                  rhs: {(_)}
                  spids: [32]
                )
              ]
              spids: [32]
            )
          ]
          spids: [16777215 29]
        )
      ]
      else_action: [
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:alias spids:[38])
              op: Equal
              rhs: {($ VSub_Number '$1')}
              spids: [38]
            )
          ]
          spids: [38]
        )
      ]
      spids: [35 41]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:url spids:[43])
          op: Equal
          rhs: {($ VSub_Number '$2')}
          spids: [43]
        )
      ]
      spids: [43]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:dir spids:[47])
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_DIR') (/testgit/) ($ VSub_DollarName '$alias'))}
          spids: [47]
        )
      ]
      spids: [47]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:prefix spids:[54])
          op: Equal
          rhs: {(DQ (refs/testgit/) ($ VSub_DollarName '$alias'))}
          spids: [54]
        )
      ]
      spids: [54]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:default_refspec spids:[61])
          op: Equal
          rhs: {(DQ ('refs/heads/*:') (${ VSub_Name prefix) ('/heads/*'))}
          spids: [61]
        )
      ]
      spids: [61]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:refspec spids:[71])
          op: Equal
          rhs: 
            {
              (DQ 
                (word_part.BracedVarSub
                  token: <VSub_Name GIT_REMOTE_TESTGIT_REFSPEC>
                  suffix_op: 
                    (suffix_op.StringUnary
                      op_id: VTest_Hyphen
                      arg_word: {($ VSub_DollarName '$default_refspec')}
                    )
                  spids: [73 77]
                )
              )
            }
          spids: [71]
        )
      ]
      spids: [71]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$refspec'))})
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:prefix spids:[91])
              op: Equal
              rhs: {(DQ (refs))}
              spids: [91]
            )
          ]
          spids: [91]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:GIT_DIR spids:[97])
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$url') (/.git))}
          spids: [97]
        )
      ]
      spids: [97]
    )
    (C {(export)} {(GIT_DIR)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:force spids:[108])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [108]
        )
      ]
      spids: [108]
    )
    (C {(mkdir)} {(-p)} {(DQ ($ VSub_DollarName '$dir'))})
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$GIT_REMOTE_TESTGIT_NO_MARKS'))})]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:gitmarks spids:[133])
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$dir') (/git.marks))}
                  spids: [133]
                )
              ]
              spids: [133]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:testgitmarks spids:[140])
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$dir') (/testgit.marks))}
                  spids: [140]
                )
              ]
              spids: [140]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} {(-e)} {(DQ ($ VSub_DollarName '$gitmarks'))})
                (command.SimpleCommand
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$gitmarks'))}
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} {(-e)} {(DQ ($ VSub_DollarName '$testgitmarks'))})
                (command.SimpleCommand
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$testgitmarks'))}
                    )
                  ]
                )
              ]
            )
          ]
          spids: [16777215 130]
        )
      ]
      spids: [16777215 178]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(read)} {(line)})]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ VSub_DollarName '$line')}
              arms: [
                (case_arm
                  pat_list: [{(capabilities)}]
                  action: [
                    (C {(echo)} {(SQ <import>)})
                    (C {(echo)} {(SQ <export>)})
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$refspec'))})
                        (C {(echo)} {(DQ ('refspec ') ($ VSub_DollarName '$refspec'))})
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$gitmarks'))})]
                          action: [
                            (C {(echo)} {(DQ ('*import-marks ') ($ VSub_DollarName '$gitmarks'))})
                            (C {(echo)} {(DQ ('*export-marks ') ($ VSub_DollarName '$gitmarks'))})
                          ]
                          spids: [16777215 244]
                        )
                      ]
                      spids: [16777215 263]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$GIT_REMOTE_TESTGIT_SIGNED_TAGS'))})
                        (C {(echo)} {(DQ (signed-tags))})
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-n)} 
                          {(DQ ($ VSub_DollarName '$GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE'))}
                        )
                        (C {(echo)} {(DQ (no-private-update))})
                      ]
                    )
                    (C {(echo)} {(SQ <option>)})
                    (C {(echo)})
                  ]
                  spids: [197 198 310 16777215]
                )
                (case_arm
                  pat_list: [{(list)}]
                  action: [
                    (C {(git)} {(for-each-ref)} {(--format) (Lit_Other '=') (SQ <'? %(refname)'>)} 
                      {(SQ <refs/heads/>)}
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:head spids:[332])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(git)} {(symbolic-ref)} {(HEAD)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [333 339]
                              )
                            }
                          spids: [332]
                        )
                      ]
                      spids: [332]
                    )
                    (C {(echo)} {(DQ ('@') ($ VSub_DollarName '$head') (' HEAD'))})
                    (C {(echo)})
                  ]
                  spids: [313 314 354 16777215]
                )
                (case_arm
                  pat_list: [{(import) (Lit_Other '*')}]
                  action: [
                    (command.WhileUntil
                      keyword: <KW_While while>
                      cond: [(C {(true)})]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:ref spids:[374])
                                  op: Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (word_part.BracedVarSub
                                          token: <VSub_Name line>
                                          suffix_op: 
                                            (suffix_op.StringUnary
                                              op_id: VOp1_Pound
                                              arg_word: {('* ')}
                                            )
                                          spids: [376 380]
                                        )
                                      )
                                    }
                                  spids: [374]
                                )
                              ]
                              spids: [374]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:refs spids:[384])
                                  op: Equal
                                  rhs: 
                                    {
                                      (DQ ($ VSub_DollarName '$refs') (' ') ($ VSub_DollarName '$ref'))
                                    }
                                  spids: [384]
                                )
                              ]
                              spids: [384]
                            )
                            (C {(read)} {(line)})
                            (command.AndOr
                              ops: [Op_DAmp]
                              children: [
                                (C {(test)} 
                                  {
                                    (DQ 
                                      (word_part.BracedVarSub
                                        token: <VSub_Name line>
                                        suffix_op: 
                                          (suffix_op.StringUnary
                                            op_id: VOp1_DPercent
                                            arg_word: {(' *')}
                                          )
                                        spids: [400 404]
                                      )
                                    )
                                  } {(KW_Bang '!') (Lit_Other '=')} {(DQ (import))}
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Break break>
                                )
                              ]
                            )
                          ]
                          spids: [371 419]
                        )
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$gitmarks'))})]
                          action: [
                            (C {(echo)} {(DQ ('feature import-marks=') ($ VSub_DollarName '$gitmarks'))})
                            (C {(echo)} {(DQ ('feature export-marks=') ($ VSub_DollarName '$gitmarks'))})
                          ]
                          spids: [16777215 434]
                        )
                      ]
                      spids: [16777215 453]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$GIT_REMOTE_TESTGIT_FAILURE'))})
                          ]
                          action: [
                            (C {(echo)} {(DQ ('feature done'))})
                            (command.ControlFlow
                              token: <ControlFlow_Exit exit>
                              arg_word: {(1)}
                            )
                          ]
                          spids: [16777215 468]
                        )
                      ]
                      spids: [16777215 483]
                    )
                    (C {(echo)} {(DQ ('feature done'))})
                    (command.Pipeline
                      children: [
                        (C {(git)} {(fast-export)} 
                          {
                            (word_part.BracedVarSub
                              token: <VSub_Name testgitmarks>
                              suffix_op: 
                                (suffix_op.StringUnary
                                  op_id: VTest_ColonPlus
                                  arg_word: 
                                    {(DQ ('--import-marks=') ($ VSub_DollarName '$testgitmarks'))}
                                )
                              spids: [500 507]
                            )
                          } 
                          {
                            (word_part.BracedVarSub
                              token: <VSub_Name testgitmarks>
                              suffix_op: 
                                (suffix_op.StringUnary
                                  op_id: VTest_ColonPlus
                                  arg_word: 
                                    {(DQ ('--export-marks=') ($ VSub_DollarName '$testgitmarks'))}
                                )
                              spids: [511 518]
                            )
                          } {($ VSub_DollarName '$refs')}
                        )
                        (C {(sed)} {(-e)} {(DQ ('s#refs/heads/#') (${ VSub_Name prefix) ('/heads/#g'))})
                      ]
                      negated: F
                    )
                    (C {(echo)} {(DQ (done))})
                  ]
                  spids: [357 359 547 16777215]
                )
                (case_arm
                  pat_list: [{(export)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$GIT_REMOTE_TESTGIT_FAILURE'))})
                          ]
                          action: [
                            (command.WhileUntil
                              keyword: <KW_While while>
                              cond: [
                                (command.Sentence
                                  child: (C {(read)} {(line)})
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.AndOr
                                      ops: [Op_DAmp]
                                      children: [
                                        (C {(test)} {(DQ (done))} {(Lit_Other '=')} 
                                          {(DQ ($ VSub_DollarName '$line'))}
                                        )
                                        (command.ControlFlow
                                          token: <ControlFlow_Break break>
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [591 611]
                                )
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Exit exit>
                              arg_word: {(1)}
                            )
                          ]
                          spids: [16777215 565]
                        )
                      ]
                      spids: [16777215 619]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:before spids:[623])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(for-each-ref)} 
                                        {(--format) (Lit_Other '=') 
                                          (SQ <' %(refname) %(objectname) '>)
                                        }
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [624 634]
                              )
                            }
                          spids: [623]
                        )
                      ]
                      spids: [623]
                    )
                    (C {(git)} {(fast-import)} 
                      {
                        (word_part.BracedVarSub
                          token: <VSub_Name force>
                          suffix_op: (suffix_op.StringUnary op_id:VTest_ColonPlus arg_word:{(--force)})
                          spids: [644 648]
                        )
                      } 
                      {
                        (word_part.BracedVarSub
                          token: <VSub_Name testgitmarks>
                          suffix_op: 
                            (suffix_op.StringUnary
                              op_id: VTest_ColonPlus
                              arg_word: {(DQ ('--import-marks=') ($ VSub_DollarName '$testgitmarks'))}
                            )
                          spids: [652 659]
                        )
                      } 
                      {
                        (word_part.BracedVarSub
                          token: <VSub_Name testgitmarks>
                          suffix_op: 
                            (suffix_op.StringUnary
                              op_id: VTest_ColonPlus
                              arg_word: {(DQ ('--export-marks=') ($ VSub_DollarName '$testgitmarks'))}
                            )
                          spids: [663 670]
                        )
                      } {(--quiet)}
                    )
                    (command.Pipeline
                      children: [
                        (C {(git)} {(for-each-ref)} 
                          {(--format) (Lit_Other '=') (SQ <'%(refname) %(objectname)'>)}
                        )
                        (command.WhileUntil
                          keyword: <KW_While while>
                          cond: [(C {(read)} {(ref)} {(a)})]
                          body: 
                            (command.DoGroup
                              children: [
                                (command.Case
                                  to_match: {(DQ ($ VSub_DollarName '$before'))}
                                  arms: [
                                    (case_arm
                                      pat_list: [
                                        {(Lit_Other '*') 
                                          (DQ (' ') ($ VSub_DollarName '$ref') (' ') 
                                            ($ VSub_DollarName '$a') (' ')
                                          ) (Lit_Other '*')
                                        }
                                      ]
                                      action: [
                                        (command.ControlFlow
                                          token: <ControlFlow_Continue continue>
                                        )
                                      ]
                                      spids: [716 725 730 16777215]
                                    )
                                  ]
                                  spids: [707 713 736]
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (C {(test)} {(-z)} 
                                          {(DQ ($ VSub_DollarName '$GIT_REMOTE_TESTGIT_PUSH_ERROR'))}
                                        )
                                      ]
                                      action: [(C {(echo)} {(DQ ('ok ') ($ VSub_DollarName '$ref'))})]
                                      spids: [16777215 750]
                                    )
                                  ]
                                  else_action: [
                                    (C {(echo)} 
                                      {
                                        (DQ ('error ') ($ VSub_DollarName '$ref') (' ') 
                                          ($ VSub_DollarName '$GIT_REMOTE_TESTGIT_PUSH_ERROR')
                                        )
                                      }
                                    )
                                  ]
                                  spids: [761 774]
                                )
                              ]
                              spids: [704 777]
                            )
                        )
                      ]
                      negated: F
                    )
                    (C {(echo)})
                  ]
                  spids: [550 551 784 16777215]
                )
                (case_arm
                  pat_list: [
                    {(option) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\ '>) 
                      (Lit_Other '*')
                    }
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [{(read)} {(cmd)} {(opt)} {(val)}]
                      redirects: [
                        (redir.HereDoc
                          op: <Redir_DLessDash '<<-'>
                          fd: 16777215
                          here_begin: {(EOF)}
                          here_end_span_id: 807
                          stdin_parts: [($ VSub_DollarName '$line') ('\n')]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {($ VSub_DollarName '$opt')}
                      arms: [
                        (case_arm
                          pat_list: [{(force)}]
                          action: [
                            (command.AndOr
                              ops: [Op_DAmp Op_DPipe]
                              children: [
                                (C {(test)} {($ VSub_DollarName '$val')} {(Lit_Other '=')} {(DQ (true))})
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:force spids:[832])
                                      op: Equal
                                      rhs: {(DQ (true))}
                                      spids: [832]
                                    )
                                  ]
                                  spids: [832]
                                )
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:force spids:[839])
                                      op: Equal
                                      rhs: (word.EmptyWord)
                                      spids: [839]
                                    )
                                  ]
                                  spids: [839]
                                )
                              ]
                            )
                            (C {(echo)} {(DQ (ok))})
                          ]
                          spids: [816 817 849 16777215]
                        )
                        (case_arm
                          pat_list: [{(Lit_Other '*')}]
                          action: [(C {(echo)} {(DQ (unsupported))})]
                          spids: [852 853 863 16777215]
                        )
                      ]
                      spids: [809 813 866]
                    )
                  ]
                  spids: [787 790 869 16777215]
                )
                (case_arm
                  pat_list: [{(SQ )}]
                  action: [(command.ControlFlow token:<ControlFlow_Exit exit>)]
                  spids: [872 874 880 16777215]
                )
              ]
              spids: [190 194 883]
            )
          ]
          spids: [187 885]
        )
    )
  ]
)