(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (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 name:alias) op: assign_op.Equal rhs: {<_>} spids: [32] ) ] ) ] spids: [13 29] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:alias) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [38] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [43] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') </testgit/> ($ Id.VSub_DollarName '$alias'))} spids: [47] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: {(DQ <refs/testgit/> ($ Id.VSub_DollarName '$alias'))} spids: [54] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:default_refspec) op: assign_op.Equal rhs: {(DQ <'refs/heads/*:'> (${ Id.VSub_Name prefix) <'/heads/*'>)} spids: [61] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:refspec) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name GIT_REMOTE_TESTGIT_REFSPEC> suffix_op: (suffix_op.Unary op_id: Id.VTest_Hyphen arg_word: {($ Id.VSub_DollarName '$default_refspec')} ) ) ) } spids: [71] ) ] ) (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 name:prefix) op: assign_op.Equal rhs: {(DQ <refs>)} spids: [91] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_DIR) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$url') </.git>)} spids: [97] ) ] ) (C {<export>} {<GIT_DIR>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:force) op: assign_op.Equal rhs: (word.Empty) spids: [108] ) ] ) (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$dir'))}) (command.If arms: [ (if_arm cond: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$GIT_REMOTE_TESTGIT_NO_MARKS'))})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:gitmarks) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$dir') </git.marks>)} spids: [133] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:testgitmarks) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$dir') </testgit.marks>)} spids: [140] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<test>} {<-e>} {(DQ ($ Id.VSub_DollarName '$gitmarks'))}) (command.Simple redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$gitmarks'))} ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<test>} {<-e>} {(DQ ($ Id.VSub_DollarName '$testgitmarks'))}) (command.Simple redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$testgitmarks'))} ) ] ) ] ) ] spids: [120 130] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(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: [(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] ) ] ) (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 name:head) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<git>} {<symbolic-ref>} {<HEAD>})] ) ) } spids: [332] ) ] ) (C {<echo>} {(DQ <'@'> ($ Id.VSub_DollarName '$head') <' HEAD'>)}) (C {<echo>}) ] spids: [313 314 354 -1] ) (case_arm pat_list: [{<import> <Id.Lit_Star '*'>}] action: [ (command.WhileUntil keyword: <Id.KW_While while> cond: [(C {<true>})] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ref) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name line> suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {<'* '>} ) ) ) } spids: [374] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:refs) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$refs') <' '> ($ Id.VSub_DollarName '$ref') ) } spids: [384] ) ] ) (C {<read>} {<line>}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} { (DQ (braced_var_sub token: <Id.VSub_Name line> suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPercent arg_word: {<' *'>} ) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <import>)} ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [(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: [423 434] ) ] ) (command.If arms: [ (if_arm cond: [ (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: [457 468] ) ] ) (C {<echo>} {(DQ <'feature done'>)}) (command.Pipeline children: [ (C {<git>} {<fast-export>} { (braced_var_sub token: <Id.VSub_Name testgitmarks> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ <'--import-marks='> ($ Id.VSub_DollarName '$testgitmarks'))} ) ) } { (braced_var_sub token: <Id.VSub_Name testgitmarks> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ <'--export-marks='> ($ Id.VSub_DollarName '$testgitmarks'))} ) ) } {($ Id.VSub_DollarName '$refs')} ) (C {<sed>} {<-e>} {(DQ <'s#refs/heads/#'> (${ Id.VSub_Name prefix) <'/heads/#g'>)} ) ] negated: F ) (C {<echo>} {(DQ <done>)}) ] spids: [357 359 547 -1] ) (case_arm pat_list: [{<export>}] action: [ (command.If arms: [ (if_arm cond: [ (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$GIT_REMOTE_TESTGIT_FAILURE'))} ) ] action: [ (command.WhileUntil keyword: <Id.KW_While while> cond: [ (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> ) ] ) ] ) ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [554 565] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:before) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<git>} {<for-each-ref>} {<--format> <Id.Lit_Equals '='> (SQ <' %(refname) %(objectname) '>) } ) ] ) ) } spids: [623] ) ] ) (C {<git>} {<fast-import>} { (braced_var_sub token: <Id.VSub_Name force> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonPlus arg_word:{<--force>}) ) } { (braced_var_sub token: <Id.VSub_Name testgitmarks> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ <'--import-marks='> ($ Id.VSub_DollarName '$testgitmarks'))} ) ) } { (braced_var_sub token: <Id.VSub_Name testgitmarks> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ <'--export-marks='> ($ Id.VSub_DollarName '$testgitmarks'))} ) ) } {<--quiet>} ) (command.Pipeline children: [ (C {<git>} {<for-each-ref>} {<--format> <Id.Lit_Equals '='> (SQ <'%(refname) %(objectname)'>)} ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(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: [716 725 730 -1] ) ] ) (command.If arms: [ (if_arm cond: [ (C {<test>} {<-z>} { (DQ ($ Id.VSub_DollarName '$GIT_REMOTE_TESTGIT_PUSH_ERROR') ) } ) ] action: [(C {<echo>} {(DQ <'ok '> ($ Id.VSub_DollarName '$ref'))})] spids: [739 750] ) ] else_action: [ (C {<echo>} { (DQ <'error '> ($ Id.VSub_DollarName '$ref') <' '> ($ Id.VSub_DollarName '$GIT_REMOTE_TESTGIT_PUSH_ERROR') ) } ) ] ) ] ) ) ] negated: F ) (C {<echo>}) ] spids: [550 551 784 -1] ) (case_arm pat_list: [ {<option> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\ '>) <Id.Lit_Star '*'> } ] action: [ (command.Simple words: [{<read>} {<cmd>} {<opt>} {<val>}] redirects: [ (redir.HereDoc op: <Id.Redir_DLessDash '<<-'> fd: -1 here_begin: {<EOF>} here_end_span_id: 807 stdin_parts: [($ Id.VSub_DollarName '$line') <'\n'>] ) ] ) (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 name:force) op: assign_op.Equal rhs: {(DQ <true>)} spids: [832] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:force) op: assign_op.Equal rhs: (word.Empty) spids: [839] ) ] ) ] ) (C {<echo>} {(DQ <ok>)}) ] spids: [816 817 849 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<echo>} {(DQ <unsupported>)})] spids: [852 853 863 -1] ) ] ) ] spids: [787 790 869 -1] ) (case_arm pat_list: [{(SQ )}] action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit>)] spids: [872 874 880 -1] ) ] ) ] ) ) ] )