(command.CommandList children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:prec) op:assign_op.Equal rhs:{<4>} spids:[19])] ) (command.ShFunction name: read_state body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:onto_name) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<cat>} {(DQ ($ Id.VSub_DollarName '$state_dir')) </onto_name>}) ] ) ) } spids: [31] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:end) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<cat>} {(DQ ($ Id.VSub_DollarName '$state_dir')) </end>}) ] ) ) } spids: [44] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msgnum) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<cat>} {(DQ ($ Id.VSub_DollarName '$state_dir')) </msgnum>}) ] ) ) } spids: [57] ) ] ) ] ) ] ) ) (command.ShFunction name: continue_merge body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<test>} {<-d>} {(DQ ($ Id.VSub_DollarName '$state_dir'))}) (C {<die>} {(DQ ($ Id.VSub_DollarName '$state_dir') <' directory does not exist'>)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:unmerged) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<git>} {<ls-files>} {<-u>})] ) ) } spids: [97] ) ] ) (command.If arms: [ (if_arm cond: [(C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$unmerged'))})] action: [ (C {<echo>} {(DQ <'You still have unmerged paths in your index'>)}) (C {<echo>} {(DQ <'did you forget to use git add?'>)}) (C {<die>} {(DQ ($ Id.VSub_DollarName '$resolvemsg'))}) ] spids: [107 118] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmt) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<cat>} {(DQ ($ Id.VSub_DollarName '$state_dir') </current>)})] ) ) } spids: [146] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [ (C {<git>} {<diff-index>} {<--quiet>} {<--ignore-submodules>} {<HEAD>} {<-->}) ] negated: T ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [ (C {<git>} {<commit>} { (braced_var_sub token: <Id.VSub_Name gpg_sign_opt> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ ($ Id.VSub_DollarName '$gpg_sign_opt'))} ) ) } {<--no-verify>} {<-C>} {(DQ ($ Id.VSub_DollarName '$cmt'))} ) ] negated: T ) ] action: [ (C {<echo>} { (DQ <'Commit failed, please do not call '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) <'git commit'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ) (C {<echo>} {(DQ <'directly, but instead do one of the following: '>)}) (C {<die>} {(DQ ($ Id.VSub_DollarName '$resolvemsg'))}) ] spids: [177 202] ) ] ) (command.If arms: [ (if_arm cond: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$GIT_QUIET'))})] action: [ (C {<printf>} {(DQ <'Committed: %0'> (${ Id.VSub_Name prec) <'d '>)} {($ Id.VSub_DollarName '$msgnum')} ) ] spids: [232 243] ) ] ) (command.Simple words: [ {<echo>} { (DQ ($ Id.VSub_DollarName '$cmt') <' '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<git>} {<rev-parse>} {<HEAD> <Id.Lit_Other '^'> <0>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir') </rewritten>)} ) ] ) ] spids: [157 174] ) ] else_action: [ (command.If arms: [ (if_arm cond: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$GIT_QUIET'))})] action: [ (C {<printf>} {(DQ <'Already applied: %0'> (${ Id.VSub_Name prec) <'d '>)} {($ Id.VSub_DollarName '$msgnum')} ) ] spids: [289 300] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$GIT_QUIET'))}) (command.Simple words: [ {<git>} {<log>} {<--format> <Id.Lit_Equals '='> <Id.Lit_Other '%'> <s>} {<-1>} {(DQ ($ Id.VSub_DollarName '$cmt'))} ] more_env: [(env_pair name:GIT_PAGER val:{(SQ )} spids:[333])] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msgnum) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$msgnum')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) } spids: [358] ) ] ) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$msgnum'))}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir') </msgnum>)} ) ] ) ] ) ) (command.ShFunction name: call_merge body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msgnum) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [392] ) ] ) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$msgnum'))}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir') </msgnum>)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmt) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<cat>} { (DQ ($ Id.VSub_DollarName '$state_dir') </cmt.> ($ Id.VSub_DollarName '$msgnum') ) } ) ] ) ) ) } spids: [411] ) ] ) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$cmt'))}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir') </current>)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hd) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<git>} {<rev-parse>} {<--verify>} {<HEAD>})] ) ) } spids: [439] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmt_name) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<git>} {<symbolic-ref>} {<HEAD>}] redirects: [ (redir.Redir op: <Id.Redir_Great '2>'> fd: 2 arg_word: {</dev/null>} ) ] ) (C {<echo>} {<HEAD>}) ] ) ] ) ) } spids: [451] ) ] ) (C {<eval>} {<GITHEAD_> ($ Id.VSub_DollarName '$cmt') <Id.Lit_Equals '='> (SQ <'"${cmt_name##refs/heads/}~$(($end - $msgnum))"'>) } ) (C {<eval>} {<GITHEAD_> ($ Id.VSub_DollarName '$hd') <Id.Lit_Equals '='> (SQ <'$onto_name'>)} ) (C {<export>} {<GITHEAD_> ($ Id.VSub_DollarName '$cmt')} {<GITHEAD_> ($ Id.VSub_DollarName '$hd')} ) (command.If arms: [ (if_arm cond: [(C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$GIT_QUIET'))})] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_MERGE_VERBOSITY) op: assign_op.Equal rhs: {<1>} spids: [514] ) ] ) (C {<export>} {<GIT_MERGE_VERBOSITY>}) ] ) ] spids: [500 511] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$strategy'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:strategy) op: assign_op.Equal rhs: {<recursive>} spids: [537] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:base) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<git>} {<rev-parse>} {<--verify>} {<--quiet>} {($ Id.VSub_DollarName '$cmt') <Id.Lit_Other '^'>} ) ] ) ) } spids: [545] ) ] ) (C {<eval>} {(SQ <'git-merge-$strategy'>)} {($ Id.VSub_DollarName '$strategy_opts')} {($ Id.VSub_DollarName '$base')} {(SQ <' -- "$hd" "$cmt"'>)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rv) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [575] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$rv'))} arms: [ (case_arm pat_list: [{<0>}] action: [ (C {<unset>} {<GITHEAD_> ($ Id.VSub_DollarName '$cmt')} {<GITHEAD_> ($ Id.VSub_DollarName '$hd')} ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] spids: [588 589 604 -1] ) (case_arm pat_list: [{<1>}] action: [ (C {<git>} {<rerere>} {($ Id.VSub_DollarName '$allow_rerere_autoupdate')}) (C {<die>} {(DQ ($ Id.VSub_DollarName '$resolvemsg'))}) ] spids: [607 608 625 -1] ) (case_arm pat_list: [{<2>}] action: [ (command.Simple words: [ {<echo>} { (DQ <'Strategy: '> ($ Id.VSub_DollarName '$strategy') <' failed, try another'> ) } ] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '1>&'> fd:1 arg_word:{<2>})] ) (C {<die>} {(DQ ($ Id.VSub_DollarName '$resolvemsg'))}) ] spids: [628 629 651 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<die>} {(DQ <'Unknown exit code ('> ($ Id.VSub_DollarName '$rv') <') from command:'>)} { (DQ <git-merge-> ($ Id.VSub_DollarName '$strategy') <' '> ($ Id.VSub_DollarName '$cmt') <'^ -- HEAD '> ($ Id.VSub_DollarName '$cmt') ) } ) ] spids: [654 655 678 -1] ) ] ) ] ) ) (command.ShFunction name: finish_rb_merge body: (command.BraceGroup children: [ (C {<move_to_original_branch>}) (command.If arms: [ (if_arm cond: [(C {<test>} {<-s>} {(DQ ($ Id.VSub_DollarName '$state_dir')) </rewritten>})] action: [ (command.Simple words: [{<git>} {<notes>} {<copy>} {<--for-rewrite> <Id.Lit_Equals '='> <rebase>}] redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir')) </rewritten>} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hook) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<git>} {<rev-parse>} {<--git-path>} {<hooks/post-rewrite>}) ] ) ) ) } spids: [729] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} {<-x>} {(DQ ($ Id.VSub_DollarName '$hook'))}) (command.Simple words: [{(DQ ($ Id.VSub_DollarName '$hook'))} {<rebase>}] redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir')) </rewritten>} ) ] ) ] ) ] spids: [697 709] ) ] ) (C {<say>} {<All>} {<done.>}) ] ) ) (command.ShFunction name: git_rebase__merge body: (command.BraceGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$action'))} arms: [ (case_arm pat_list: [{<Id.ControlFlow_Continue continue>}] action: [ (C {<read_state>}) (C {<continue_merge>}) (command.WhileUntil keyword: <Id.KW_While while> cond: [ (C {<test>} {(DQ ($ Id.VSub_DollarName '$msgnum'))} {<-le>} {(DQ ($ Id.VSub_DollarName '$end'))} ) ] body: (command.DoGroup children: [ (C {<call_merge>} {(DQ ($ Id.VSub_DollarName '$msgnum'))}) (C {<continue_merge>}) ] ) ) (C {<finish_rb_merge>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] spids: [821 822 868 -1] ) (case_arm pat_list: [{<skip>}] action: [ (C {<read_state>}) (C {<git>} {<rerere>} {<clear>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msgnum) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$msgnum')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) } spids: [884] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [ (C {<test>} {(DQ ($ Id.VSub_DollarName '$msgnum'))} {<-le>} {(DQ ($ Id.VSub_DollarName '$end'))} ) ] body: (command.DoGroup children: [ (C {<call_merge>} {(DQ ($ Id.VSub_DollarName '$msgnum'))}) (C {<continue_merge>}) ] ) ) (C {<finish_rb_merge>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] spids: [870 871 932 -1] ) ] ) (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$state_dir'))}) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$onto_name'))}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir') </onto_name>)} ) ] ) (C {<write_basic_state>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msgnum) op: assign_op.Equal rhs: {<0>} spids: [961] ) ] ) (command.ForEach iter_name: cmt iter_words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<git>} {<rev-list>} {<--reverse>} {<--no-merges>} {(DQ ($ Id.VSub_DollarName '$revisions'))} ) ] ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msgnum) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$msgnum')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) } spids: [987] ) ] ) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$cmt'))}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$state_dir') </cmt.> ($ Id.VSub_DollarName '$msgnum') ) } ) ] ) ] ) ) (command.Simple words: [{<echo>} {<1>}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir') </msgnum>)} ) ] ) (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$msgnum')}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$state_dir') </end>)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:end) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$msgnum')} spids: [1036] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msgnum) op: assign_op.Equal rhs: {<1>} spids: [1039] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [ (C {<test>} {(DQ ($ Id.VSub_DollarName '$msgnum'))} {<-le>} {(DQ ($ Id.VSub_DollarName '$end'))} ) ] body: (command.DoGroup children: [ (C {<call_merge>} {(DQ ($ Id.VSub_DollarName '$msgnum'))}) (C {<continue_merge>}) ] ) ) (C {<finish_rb_merge>}) ] ) ) (C {<git_rebase__merge>}) ] )