(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(test)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} 
                  {(DQ ('testgit::') ($ VSub_Number '$2'))}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:alias) op:Equal rhs:{(_)} spids:[32])]
              spids: [32]
            )
          ]
          spids: [-1 29]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:alias)
              op: Equal
              rhs: {($ VSub_Number '$1')}
              spids: [38]
            )
          ]
          spids: [38]
        )
      ]
      spids: [35 41]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:url) op:Equal rhs:{($ VSub_Number '$2')} spids:[43])]
      spids: [43]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:dir)
          op: Equal
          rhs: {(DQ ($ VSub_Name '$GIT_DIR') (/testgit/) ($ VSub_Name '$alias'))}
          spids: [47]
        )
      ]
      spids: [47]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:prefix)
          op: Equal
          rhs: {(DQ (refs/testgit/) ($ VSub_Name '$alias'))}
          spids: [54]
        )
      ]
      spids: [54]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:default_refspec)
          op: Equal
          rhs: {(DQ ('refs/heads/*:') (${ VSub_Name prefix) ('/heads/*'))}
          spids: [61]
        )
      ]
      spids: [61]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:refspec)
          op: Equal
          rhs: 
            {
              (DQ 
                (BracedVarSub
                  token: <VSub_Name GIT_REMOTE_TESTGIT_REFSPEC>
                  suffix_op: 
                    (StringUnary
                      op_id: VTest_Hyphen
                      arg_word: {($ VSub_Name '$default_refspec')}
                    )
                  spids: [73 77]
                )
              )
            }
          spids: [71]
        )
      ]
      spids: [71]
    )
    (AndOr
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_Name '$refspec'))})
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:prefix) op:Equal rhs:{(DQ (refs))} spids:[91])]
          spids: [91]
        )
      ]
      op_id: Op_DAmp
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:GIT_DIR)
          op: Equal
          rhs: {(DQ ($ VSub_Name '$url') (/.git))}
          spids: [97]
        )
      ]
      spids: [97]
    )
    (C {(export)} {(GIT_DIR)})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:force) op:Equal rhs:{(SQ )} spids:[108])]
      spids: [108]
    )
    (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$dir'))})
    (If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$GIT_REMOTE_TESTGIT_NO_MARKS'))})]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:gitmarks)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name '$dir') (/git.marks))}
                  spids: [133]
                )
              ]
              spids: [133]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:testgitmarks)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name '$dir') (/testgit.marks))}
                  spids: [140]
                )
              ]
              spids: [140]
            )
            (AndOr
              children: [
                (C {(test)} {(-e)} {(DQ ($ VSub_Name '$gitmarks'))})
                (SimpleCommand
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: -1
                      arg_word: {(DQ ($ VSub_Name '$gitmarks'))}
                      spids: [157]
                    )
                  ]
                )
              ]
              op_id: Op_DPipe
            )
            (AndOr
              children: [
                (C {(test)} {(-e)} {(DQ ($ VSub_Name '$testgitmarks'))})
                (SimpleCommand
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: -1
                      arg_word: {(DQ ($ VSub_Name '$testgitmarks'))}
                      spids: [173]
                    )
                  ]
                )
              ]
              op_id: Op_DPipe
            )
          ]
          spids: [-1 130]
        )
      ]
      spids: [-1 178]
    )
    (While
      cond: [(C {(read)} {(line)})]
      body: 
        (DoGroup
          children: [
            (Case
              to_match: {($ VSub_Name '$line')}
              arms: [
                (case_arm
                  pat_list: [{(capabilities)}]
                  action: [
                    (C {(echo)} {(SQ <import>)})
                    (C {(echo)} {(SQ <export>)})
                    (AndOr
                      children: [
                        (C {(test)} {(-n)} {(DQ ($ VSub_Name '$refspec'))})
                        (C {(echo)} {(DQ ('refspec ') ($ VSub_Name '$refspec'))})
                      ]
                      op_id: Op_DAmp
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$gitmarks'))})]
                          action: [
                            (C {(echo)} {(DQ ('*import-marks ') ($ VSub_Name '$gitmarks'))})
                            (C {(echo)} {(DQ ('*export-marks ') ($ VSub_Name '$gitmarks'))})
                          ]
                          spids: [-1 244]
                        )
                      ]
                      spids: [-1 263]
                    )
                    (AndOr
                      children: [
                        (C {(test)} {(-n)} {(DQ ($ VSub_Name '$GIT_REMOTE_TESTGIT_SIGNED_TAGS'))})
                        (C {(echo)} {(DQ (signed-tags))})
                      ]
                      op_id: Op_DAmp
                    )
                    (AndOr
                      children: [
                        (C {(test)} {(-n)} {(DQ ($ VSub_Name '$GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE'))})
                        (C {(echo)} {(DQ (no-private-update))})
                      ]
                      op_id: Op_DAmp
                    )
                    (C {(echo)} {(SQ <option>)})
                    (C {(echo)})
                  ]
                  spids: [197 198 310 -1]
                )
                (case_arm
                  pat_list: [{(list)}]
                  action: [
                    (C {(git)} {(for-each-ref)} {(--format) (Lit_Other '=') (SQ <'? %(refname)'>)} 
                      {(SQ <refs/heads/>)}
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:head)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [(C {(git)} {(symbolic-ref)} {(HEAD)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [333 339]
                              )
                            }
                          spids: [332]
                        )
                      ]
                      spids: [332]
                    )
                    (C {(echo)} {(DQ ('@') ($ VSub_Name '$head') (' HEAD'))})
                    (C {(echo)})
                  ]
                  spids: [313 314 354 -1]
                )
                (case_arm
                  pat_list: [{(import) (Lit_Other '*')}]
                  action: [
                    (While
                      cond: [(C {(true)})]
                      body: 
                        (DoGroup
                          children: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:ref)
                                  op: Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (BracedVarSub
                                          token: <VSub_Name line>
                                          suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{('* ')})
                                          spids: [376 380]
                                        )
                                      )
                                    }
                                  spids: [374]
                                )
                              ]
                              spids: [374]
                            )
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:refs)
                                  op: Equal
                                  rhs: {(DQ ($ VSub_Name '$refs') (' ') ($ VSub_Name '$ref'))}
                                  spids: [384]
                                )
                              ]
                              spids: [384]
                            )
                            (C {(read)} {(line)})
                            (AndOr
                              children: [
                                (C {(test)} 
                                  {
                                    (DQ 
                                      (BracedVarSub
                                        token: <VSub_Name line>
                                        suffix_op: (StringUnary op_id:VOp1_DPercent arg_word:{(' *')})
                                        spids: [400 404]
                                      )
                                    )
                                  } {(KW_Bang '!') (Lit_Other '=')} {(DQ (import))}
                                )
                                (ControlFlow
                                  token: <ControlFlow_Break break>
                                )
                              ]
                              op_id: Op_DAmp
                            )
                          ]
                          spids: [371 419]
                        )
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$gitmarks'))})]
                          action: [
                            (C {(echo)} {(DQ ('feature import-marks=') ($ VSub_Name '$gitmarks'))})
                            (C {(echo)} {(DQ ('feature export-marks=') ($ VSub_Name '$gitmarks'))})
                          ]
                          spids: [-1 434]
                        )
                      ]
                      spids: [-1 453]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$GIT_REMOTE_TESTGIT_FAILURE'))})]
                          action: [(C {(echo)} {(DQ ('feature done'))}) (C {(exit)} {(1)})]
                          spids: [-1 468]
                        )
                      ]
                      spids: [-1 483]
                    )
                    (C {(echo)} {(DQ ('feature done'))})
                    (Pipeline
                      children: [
                        (C {(git)} {(fast-export)} 
                          {
                            (BracedVarSub
                              token: <VSub_Name testgitmarks>
                              suffix_op: 
                                (StringUnary
                                  op_id: VTest_ColonPlus
                                  arg_word: {(DQ ('--import-marks=') ($ VSub_Name '$testgitmarks'))}
                                )
                              spids: [500 507]
                            )
                          } 
                          {
                            (BracedVarSub
                              token: <VSub_Name testgitmarks>
                              suffix_op: 
                                (StringUnary
                                  op_id: VTest_ColonPlus
                                  arg_word: {(DQ ('--export-marks=') ($ VSub_Name '$testgitmarks'))}
                                )
                              spids: [511 518]
                            )
                          } {($ VSub_Name '$refs')}
                        )
                        (C {(sed)} {(-e)} {(DQ ('s#refs/heads/#') (${ VSub_Name prefix) ('/heads/#g'))})
                      ]
                      negated: False
                    )
                    (C {(echo)} {(DQ (done))})
                  ]
                  spids: [357 359 547 -1]
                )
                (case_arm
                  pat_list: [{(export)}]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$GIT_REMOTE_TESTGIT_FAILURE'))})]
                          action: [
                            (While
                              cond: [(Sentence child:(C {(read)} {(line)}) terminator:<Op_Semi ';'>)]
                              body: 
                                (DoGroup
                                  children: [
                                    (AndOr
                                      children: [
                                        (C {(test)} {(DQ (done))} {(Lit_Other '=')} 
                                          {(DQ ($ VSub_Name '$line'))}
                                        )
                                        (ControlFlow
                                          token: <ControlFlow_Break break>
                                        )
                                      ]
                                      op_id: Op_DAmp
                                    )
                                  ]
                                  spids: [591 611]
                                )
                            )
                            (C {(exit)} {(1)})
                          ]
                          spids: [-1 565]
                        )
                      ]
                      spids: [-1 619]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:before)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (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)} 
                      {
                        (BracedVarSub
                          token: <VSub_Name force>
                          suffix_op: (StringUnary op_id:VTest_ColonPlus arg_word:{(--force)})
                          spids: [644 648]
                        )
                      } 
                      {
                        (BracedVarSub
                          token: <VSub_Name testgitmarks>
                          suffix_op: 
                            (StringUnary
                              op_id: VTest_ColonPlus
                              arg_word: {(DQ ('--import-marks=') ($ VSub_Name '$testgitmarks'))}
                            )
                          spids: [652 659]
                        )
                      } 
                      {
                        (BracedVarSub
                          token: <VSub_Name testgitmarks>
                          suffix_op: 
                            (StringUnary
                              op_id: VTest_ColonPlus
                              arg_word: {(DQ ('--export-marks=') ($ VSub_Name '$testgitmarks'))}
                            )
                          spids: [663 670]
                        )
                      } {(--quiet)}
                    )
                    (Pipeline
                      children: [
                        (C {(git)} {(for-each-ref)} 
                          {(--format) (Lit_Other '=') (SQ <'%(refname) %(objectname)'>)}
                        )
                        (While
                          cond: [(C {(read)} {(ref)} {(a)})]
                          body: 
                            (DoGroup
                              children: [
                                (Case
                                  to_match: {(DQ ($ VSub_Name '$before'))}
                                  arms: [
                                    (case_arm
                                      pat_list: [
                                        {(Lit_Other '*') 
                                          (DQ (' ') ($ VSub_Name '$ref') (' ') ($ VSub_Name '$a') (' ')) (Lit_Other '*')
                                        }
                                      ]
                                      action: [(ControlFlow token:<ControlFlow_Continue continue>)]
                                      spids: [716 725 730 -1]
                                    )
                                  ]
                                  spids: [707 713 736]
                                )
                                (If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (C {(test)} {(-z)} 
                                          {(DQ ($ VSub_Name '$GIT_REMOTE_TESTGIT_PUSH_ERROR'))}
                                        )
                                      ]
                                      action: [(C {(echo)} {(DQ ('ok ') ($ VSub_Name '$ref'))})]
                                      spids: [-1 750]
                                    )
                                  ]
                                  else_action: [
                                    (C {(echo)} 
                                      {
                                        (DQ ('error ') ($ VSub_Name '$ref') (' ') 
                                          ($ VSub_Name '$GIT_REMOTE_TESTGIT_PUSH_ERROR')
                                        )
                                      }
                                    )
                                  ]
                                  spids: [761 774]
                                )
                              ]
                              spids: [704 777]
                            )
                        )
                      ]
                      negated: False
                    )
                    (C {(echo)})
                  ]
                  spids: [550 551 784 -1]
                )
                (case_arm
                  pat_list: [
                    {(option) (EscapedLiteralPart token:<Lit_EscapedChar '\\ '>) (Lit_Other '*')}
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(read)} {(cmd)} {(opt)} {(val)}]
                      redirects: [
                        (HereDoc
                          op_id: Redir_DLessDash
                          fd: -1
                          body: {(DQ ($ VSub_Name '$line') ('\n'))}
                          do_expansion: True
                          here_end: EOF
                          was_filled: True
                          spids: [801]
                        )
                      ]
                    )
                    (Case
                      to_match: {($ VSub_Name '$opt')}
                      arms: [
                        (case_arm
                          pat_list: [{(force)}]
                          action: [
                            (AndOr
                              children: [
                                (C {(test)} {($ VSub_Name '$val')} {(Lit_Other '=')} {(DQ (true))})
                                (AndOr
                                  children: [
                                    (Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (LhsName name:force)
                                          op: Equal
                                          rhs: {(DQ (true))}
                                          spids: [830]
                                        )
                                      ]
                                      spids: [830]
                                    )
                                    (Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (LhsName name:force)
                                          op: Equal
                                          rhs: {(SQ )}
                                          spids: [837]
                                        )
                                      ]
                                      spids: [837]
                                    )
                                  ]
                                  op_id: Op_DPipe
                                )
                              ]
                              op_id: Op_DAmp
                            )
                            (C {(echo)} {(DQ (ok))})
                          ]
                          spids: [814 815 847 -1]
                        )
                        (case_arm
                          pat_list: [{(Lit_Other '*')}]
                          action: [(C {(echo)} {(DQ (unsupported))})]
                          spids: [850 851 861 -1]
                        )
                      ]
                      spids: [807 811 864]
                    )
                  ]
                  spids: [787 790 867 -1]
                )
                (case_arm
                  pat_list: [{(SQ )}]
                  action: [(C {(exit)})]
                  spids: [-1 872 878 -1]
                )
              ]
              spids: [190 194 881]
            )
          ]
          spids: [187 883]
        )
    )
  ]
)