(command.CommandList children: [ (C {(.)} {(git-sh-setup)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(-d)} {(DQ ($ VSub_DollarName '$GIT_DIR')) (/remotes)} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('Rewriting ') ($ VSub_DollarName '$GIT_DIR') (/remotes))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:error) op:Equal rhs:{(0)})] ) (command.Pipeline children: [ (command.BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_DollarName '$GIT_DIR')) (/remotes)}) (command.Pipeline children: [ (C {(ls)}) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(read)} {(f)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:name) op: Equal rhs: { (word_part.CommandSub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(printf)} {(DQ ($ VSub_DollarName '$f'))}) (C {(tr)} {(-c)} {(DQ (A-Za-z0-9-))} {(DQ (.))}) ] negated: F ) ] ) ) } ) ] ) (command.Simple words: [ {(sed)} {(-n)} {(-e)} { (DQ ('s/^URL:[ \t]*') (Lit_Other '\\') ('(.*') (Lit_Other '\\') (')') (Lit_Other '$') (/remote.) ($ VSub_DollarName '$name') ('.url ') (Lit_Other '\\') ('1 ./p') ) } {(-e)} { (DQ ('s/^Pull:[ \t]*') (Lit_Other '\\') ('(.*') (Lit_Other '\\') (')') (Lit_Other '$') (/remote.) ($ VSub_DollarName '$name') ('.fetch ') (Lit_Other '\\') ('1 ^') (Lit_Other '$') (' /p') ) } {(-e)} { (DQ ('s/^Push:[ \t]*') (Lit_Other '\\') ('(.*') (Lit_Other '\\') (')') (Lit_Other '$') (/remote.) ($ VSub_DollarName '$name') ('.push ') (Lit_Other '\\') ('1 ^') (Lit_Other '$') (' /p') ) } ] redirects: [ (redir.Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ ($ VSub_DollarName '$f'))} ) ] ) ] ) ) ] negated: F ) (C {(echo)} {(KW_Done done)}) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(read)} {(key)} {(value)} {(regex)}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Case to_match: {($ VSub_DollarName '$key')} arms: [ (case_arm pat_list: [{(KW_Done done)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {($ VSub_DollarName '$error')} {(Lit_Other '=')} {(0)} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(mv)} {(DQ ($ VSub_DollarName '$GIT_DIR')) (/remotes)} {(DQ ($ VSub_DollarName '$GIT_DIR')) (/remotes.old)} ) ] ) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {(echo)} {(DQ ('git config ') ($ VSub_DollarName '$key') (' ')) ($ VSub_DollarName '$value') (DQ (' ') ($ VSub_DollarName '$regex')) } ) (command.AndOr ops: [Op_DPipe] children: [ (C {(git)} {(config)} {($ VSub_DollarName '$key')} {(DQ ($ VSub_DollarName '$value'))} {($ VSub_DollarName '$regex')} ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:error) op: Equal rhs: {(1)} ) ] ) ] ) ] ) ] ) ] ) ) ] negated: F ) ] ) ] ) ] )