(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: (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 '$('> child: (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 '$('> child: (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 '$('> child: (C {<cat>} {(DQ ($ Id.VSub_DollarName '$state_dir')) <'/msgnum'>}) ) } spids: [57] ) ] ) ] ) ] ) ) (command.ShFunction name: continue_merge body: (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 '$('> child: (C {<git>} {<ls-files>} {<-u>}) ) } spids: [97] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [(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 '$('> child: (C {<cat>} {(DQ ($ Id.VSub_DollarName '$state_dir') <'/current'>)}) ) } spids: [146] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Pipeline children: [ (C {<git>} {<diff-index>} {<--quiet>} {<--ignore-submodules>} {<HEAD>} {<-->}) ] negated: T ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Pipeline children: [ (C {<git>} {<commit>} { (braced_var_sub token: <Id.VSub_Name gpg_sign_opt> suffix_op: (suffix_op.Unary tok: <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: (condition.Shell commands: [(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 '$('> child: (C {<git>} {<rev-parse>} {<HEAD> <Id.Lit_Other '^'> <0>}) ) ) } ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$state_dir') <'/rewritten'>)} ) ] do_fork: T ) ] spids: [157 174] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [(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])] do_fork: T ) ] ) (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: {($ Id.VSub_DollarName '$msgnum')} right: {<Id.Lit_Digits 1>} ) ) } spids: [358] ) ] ) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$msgnum'))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$state_dir') <'/msgnum'>)} ) ] do_fork: T ) ] ) ) (command.ShFunction name: call_merge body: (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 op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$state_dir') <'/msgnum'>)} ) ] do_fork: T ) (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 '$('> child: (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 op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$state_dir') <'/current'>)} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hd) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (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 '$('> child: (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<git>} {<symbolic-ref>} {<HEAD>}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (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: (condition.Shell commands: [(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 '$('> child: (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 op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (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: (BraceGroup children: [ (C {<move_to_original_branch>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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 op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_DollarName '$state_dir')) <'/rewritten'>} ) ] do_fork: T ) (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 '$('> child: (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 op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_DollarName '$state_dir')) <'/rewritten'>} ) ] do_fork: T ) ] ) ] spids: [697 709] ) ] ) (C {<say>} {<All>} {<done.>}) ] ) ) (command.ShFunction name: git_rebase__merge body: (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: (condition.Shell commands: [ (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: {($ Id.VSub_DollarName '$msgnum')} right: {<Id.Lit_Digits 1>} ) ) } spids: [884] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (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 op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$state_dir') <'/onto_name'>)} ) ] do_fork: T ) (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_names: [cmt] iterable: (for_iter.Words words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<rev-list>} {<--reverse>} {<--no-merges>} {(DQ ($ Id.VSub_DollarName '$revisions'))} ) ) } ] ) 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: {($ Id.VSub_DollarName '$msgnum')} right: {<Id.Lit_Digits 1>} ) ) } spids: [987] ) ] ) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$cmt'))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: { (DQ ($ Id.VSub_DollarName '$state_dir') <'/cmt.'> ($ Id.VSub_DollarName '$msgnum') ) } ) ] do_fork: T ) ] ) ) (command.Simple words: [{<echo>} {<1>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$state_dir') <'/msgnum'>)} ) ] do_fork: T ) (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$msgnum')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$state_dir') <'/end'>)} ) ] do_fork: T ) (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: (condition.Shell commands: [ (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>}) ] )