(command.CommandList children: [ (C {(.)} {(git-sh-setup)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-d)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR')) (/remotes)} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:25) ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('Rewriting ') ($ Id.VSub_DollarName '$GIT_DIR') (/remotes))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:38) fd: -1 arg_word: {(2)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:error) op: assign_op.Equal rhs: {(0)} spids: [42] ) ] ) (command.Pipeline children: [ (command.BraceGroup children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR')) (/remotes)}) (command.Pipeline children: [ (C {(ls)}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:65) cond: [ (command.Sentence child: (C {(read)} {(f)}) terminator: (Token id:Id.Op_Semi val:';' span_id:70) ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 76 ) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(printf)} {(DQ ($ Id.VSub_DollarName '$f'))}) (C {(tr)} {(-c)} {(DQ (A-Za-z0-9-))} {(DQ (.))}) ] negated: F ) ] ) ) } spids: [75] ) ] ) (command.Simple words: [ {(sed)} {(-n)} {(-e)} { (DQ ('s/^URL:[ \t]*') (Id.Lit_Other '\\') ('(.*') (Id.Lit_Other '\\') (')') (Id.Lit_Other '$') (/remote.) ($ Id.VSub_DollarName '$name') ('.url ') (Id.Lit_Other '\\') ('1 ./p') ) } {(-e)} { (DQ ('s/^Pull:[ \t]*') (Id.Lit_Other '\\') ('(.*') (Id.Lit_Other '\\') (')') (Id.Lit_Other '$') (/remote.) ($ Id.VSub_DollarName '$name') ('.fetch ') (Id.Lit_Other '\\') ('1 ^') (Id.Lit_Other '$') (' /p') ) } {(-e)} { (DQ ('s/^Push:[ \t]*') (Id.Lit_Other '\\') ('(.*') (Id.Lit_Other '\\') (')') (Id.Lit_Other '$') (/remote.) ($ Id.VSub_DollarName '$name') ('.push ') (Id.Lit_Other '\\') ('1 ^') (Id.Lit_Other '$') (' /p') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:163) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$f'))} ) ] ) ] ) ) ] negated: F ) (C {(echo)} {(Id.KW_Done done)}) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:182) cond: [ (command.Sentence child: (C {(read)} {(key)} {(value)} {(regex)}) terminator: (Token id:Id.Op_Semi val:';' span_id:191) ) ] body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$key')} arms: [ (case_arm pat_list: [{(Id.KW_Done done)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$error')} {(Id.Lit_Equals '=')} {(0)} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:218) ) ] action: [ (C {(mv)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR')) (/remotes)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR')) (/remotes.old)} ) ] spids: [207 220] ) ] ) ] spids: [203 204 238 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(echo)} {(DQ ('git config ') ($ Id.VSub_DollarName '$key') (' ')) ($ Id.VSub_DollarName '$value') (DQ (' ') ($ Id.VSub_DollarName '$regex')) } ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(config)} {($ Id.VSub_DollarName '$key')} {(DQ ($ Id.VSub_DollarName '$value'))} {($ Id.VSub_DollarName '$regex')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:error) op: assign_op.Equal rhs: {(1)} spids: [273] ) ] ) ] ) ] spids: [241 242 276 -1] ) ] ) ] ) ) ] negated: F ) ] spids: [13 27] ) ] ) ] )