(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) op:Equal rhs:{(_)})] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:alias) op:Equal rhs:{($ VSub_Number '$1')})] ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:url) op:Equal rhs:{($ VSub_Number '$2')})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dir) op: Equal rhs: {(DQ ($ VSub_DollarName '$GIT_DIR') (/testgit/) ($ VSub_DollarName '$alias'))} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:prefix) op: Equal rhs: {(DQ (refs/testgit/) ($ VSub_DollarName '$alias'))} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:default_refspec) op: Equal rhs: {(DQ ('refs/heads/*:') (${ VSub_Name prefix) ('/heads/*'))} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:refspec) 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')} ) ) ) } ) ] ) (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) op:Equal rhs:{(DQ (refs))})] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:GIT_DIR) op: Equal rhs: {(DQ ($ VSub_DollarName '$url') (/.git))} ) ] ) (C {(export)} {(GIT_DIR)}) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:force) op:Equal rhs:(word.EmptyWord))] ) (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) op: Equal rhs: {(DQ ($ VSub_DollarName '$dir') (/git.marks))} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:testgitmarks) op: Equal rhs: {(DQ ($ VSub_DollarName '$dir') (/testgit.marks))} ) ] ) (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'))} ) ] ) ] ) ] ) ] ) (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'))}) ] ) ] ) (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)}) ] ) (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) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(symbolic-ref)} {(HEAD)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(echo)} {(DQ ('@') ($ VSub_DollarName '$head') (' HEAD'))}) (C {(echo)}) ] ) (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) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name line> suffix_op: (suffix_op.StringUnary op_id: VOp1_Pound arg_word: {('* ')} ) ) ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:refs) op: Equal rhs: { (DQ ($ VSub_DollarName '$refs') (' ') ($ VSub_DollarName '$ref')) } ) ] ) (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: {(' *')} ) ) ) } {(KW_Bang '!') (Lit_Other '=')} {(DQ (import))} ) (command.ControlFlow token: <ControlFlow_Break break> ) ] ) ] ) ) (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'))}) ] ) ] ) (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)} ) ] ) ] ) (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'))} ) ) } { (word_part.BracedVarSub token: <VSub_Name testgitmarks> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {(DQ ('--export-marks=') ($ VSub_DollarName '$testgitmarks'))} ) ) } {($ VSub_DollarName '$refs')} ) (C {(sed)} {(-e)} {(DQ ('s#refs/heads/#') (${ VSub_Name prefix) ('/heads/#g'))}) ] negated: F ) (C {(echo)} {(DQ (done))}) ] ) (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> ) ] ) ] ) ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:before) 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 '$('> ) } ) ] ) (C {(git)} {(fast-import)} { (word_part.BracedVarSub token: <VSub_Name force> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonPlus arg_word:{(--force)}) ) } { (word_part.BracedVarSub token: <VSub_Name testgitmarks> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {(DQ ('--import-marks=') ($ VSub_DollarName '$testgitmarks'))} ) ) } { (word_part.BracedVarSub token: <VSub_Name testgitmarks> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {(DQ ('--export-marks=') ($ VSub_DollarName '$testgitmarks'))} ) ) } {(--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> ) ] ) ] ) (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'))})] ) ] else_action: [ (C {(echo)} { (DQ ('error ') ($ VSub_DollarName '$ref') (' ') ($ VSub_DollarName '$GIT_REMOTE_TESTGIT_PUSH_ERROR') ) } ) ] ) ] ) ) ] negated: F ) (C {(echo)}) ] ) (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) op: Equal rhs: {(DQ (true))} ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:force) op:Equal rhs:(word.EmptyWord))] ) ] ) (C {(echo)} {(DQ (ok))}) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(echo)} {(DQ (unsupported))})] ) ] ) ] ) (case_arm pat_list: [{(SQ )}] action: [(command.ControlFlow token:<ControlFlow_Exit exit>)] ) ] ) ] ) ) ] )