(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bases) op: assign_op.Equal rhs: (word.Empty) spids: [22] ) (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: (word.Empty) spids: [24] ) (assign_pair lhs: (sh_lhs_expr.Name name:remotes) op: assign_op.Equal rhs: (word.Empty) spids: [26] ) (assign_pair lhs: (sh_lhs_expr.Name name:sep_seen) op: assign_op.Equal rhs: (word.Empty) spids: [28] ) ] ) (command.ForEach iter_name: arg do_arg_iter: T body: (command.DoGroup children: [ (command.Case to_match: { (DQ (',') ($ Id.VSub_DollarName '$sep_seen') (',') ($ Id.VSub_DollarName '$head') (',') ($ Id.VSub_DollarName '$arg') (',') ) } arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (Id.Lit_Comma ',') (--) (Id.Lit_Comma ',')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sep_seen) op: assign_op.Equal rhs: {(yes)} spids: [59] ) ] ) ] spids: [52 56 63 -1] ) (case_arm pat_list: [ {(Id.Lit_Comma ',') (yes) (Id.Lit_Comma ',') (Id.Lit_Comma ',') (Id.Lit_Star '*')} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$arg')} spids: [74] ) ] ) ] spids: [66 71 78 -1] ) (case_arm pat_list: [{(Id.Lit_Comma ',') (yes) (Id.Lit_Comma ',') (Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:remotes) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$remotes') ($ Id.VSub_DollarName '$arg') (' ')) } spids: [88] ) ] ) ] spids: [81 85 96 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bases) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$bases') ($ Id.VSub_DollarName '$arg') (' '))} spids: [103] ) ] ) ] spids: [99 100 111 -1] ) ] ) ] ) ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$remotes'))} arms: [ (case_arm pat_list: [ {(Id.Lit_QMark '?') (Id.Lit_Star '*') (SQ (Token id:Id.Lit_Chars val:' ' span_id:133)) (Id.Lit_QMark '?') (Id.Lit_Star '*') } ] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:140) arg_word: {(2)} ) ] spids: [130 137 144 -1] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(SQ )} {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_DollarName '$bases'))})] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:168) arg_word: {(2)} ) ] spids: [152 165] ) ] ) (C {(git)} {(update-index)} {(-q)} {(--refresh)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(read-tree)} {(-u)} {(-m)} {(--aggressive)} {($ Id.VSub_DollarName '$bases')} {($ Id.VSub_DollarName '$head')} {($ Id.VSub_DollarName '$remotes')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:201) arg_word: {(2)} ) ] ) (C {(echo)} {(DQ ('Trying simple merge.'))}) (command.If arms: [ (if_arm cond: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result_tree) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:214) command_list: (command.CommandList children: [ (command.Simple words: [{(git)} {(write-tree)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:219) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) } spids: [213] ) ] ) ] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:226) arg_word: {(0)} ) ] spids: [211 223] ) ] else_action: [ (C {(echo)} {(DQ ('Simple merge failed, trying Automatic merge.'))}) (command.If arms: [ (if_arm cond: [(C {(git-merge-index)} {(-o)} {(git-merge-one-file)} {(-a)})] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:254) arg_word: {(0)} ) ] spids: [240 251] ) ] else_action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:262) arg_word: {(1)} ) ] ) ] ) ] )