(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USAGE) op: assign_op.Equal rhs: {(SQ <'<start> <url> [<end>]'>)} spids: [16] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LONG_USAGE) op: assign_op.Equal rhs: { (SQ <'Summarizes the changes between two commits to the standard output,\n'> <'and includes the given URL in the generated summary.'> ) } spids: [21] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SUBDIRECTORY_OK) op: assign_op.Equal rhs: {(SQ <Yes>)} spids: [27] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTIONS_KEEPDASHDASH) op: assign_op.Equal rhs: (word.Empty) spids: [32] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTIONS_STUCKLONG) op: assign_op.Equal rhs: (word.Empty) spids: [34] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTIONS_SPEC) op: assign_op.Equal rhs: { (SQ <'git request-pull [options] start url [end]\n'> <'--\n'> <'p show patch text as well\n'> ) } spids: [36] ) ] ) (C {<.>} {<git-sh-setup>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_PAGER) op: assign_op.Equal rhs: (word.Empty) spids: [49] ) ] ) (C {<export>} {<GIT_PAGER>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:patch) op: assign_op.Equal rhs: (word.Empty) spids: [56] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [ (command.Case to_match: {(DQ ($ Id.VSub_Pound '$#'))} arms: [ (case_arm pat_list: [{<0>}] action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [68 69 73 -1] ) ] ) ] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{<-p>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:patch) op: assign_op.Equal rhs: {<-p>} spids: [93] ) ] ) ] spids: [89 90 96 -1] ) (case_arm pat_list: [{<-->}] action: [ (command.Sentence child: (C {<shift>}) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Break break>) ] spids: [99 100 108 -1] ) (case_arm pat_list: [{<-> <Id.Lit_Star '*'>}] action: [(C {<usage>})] spids: [111 113 118 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [121 122 127 -1] ) ] ) (C {<shift>}) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:base) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [138] ) (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [141] ) (assign_pair lhs: (sh_lhs_expr.Name name:status) op: assign_op.Equal rhs: {<0>} spids: [144] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$base'))}) (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$url'))}) (C {<usage>}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:baserev) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<rev-parse>} {<--verify>} {<--quiet>} {(DQ ($ Id.VSub_DollarName '$base')) <Id.Lit_Other '^'> <0>} ) ) } spids: [171] ) ] ) (command.If arms: [ (if_arm cond: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$baserev'))})] action: [(C {<die>} {(DQ <'fatal: Not a valid revision: '> ($ Id.VSub_DollarName '$base'))})] spids: [188 198] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:local) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Number 3> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<':*'>}) ) } spids: [226] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:local) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name local> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<HEAD>}) ) } spids: [233] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:remote) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Number 3> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Pound arg_word:{<'*:'>}) ) } spids: [240] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pretty_remote) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name remote> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Pound arg_word:{<refs> <Id.Lit_Slash '/'>}) ) } spids: [247] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pretty_remote) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name pretty_remote> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Pound arg_word:{<heads> <Id.Lit_Slash '/'>}) ) } spids: [255] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<symbolic-ref>} {<-q>} {(DQ ($ Id.VSub_DollarName '$local'))}) ) } spids: [263] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name head> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<git>} {<show-ref>} {<--heads>} {<--tags>} {(DQ ($ Id.VSub_DollarName '$local'))} ) (C {<cut>} {<-d> (SQ <' '>)} {<-f2>}) ] negated: F ) ) } ) ) } spids: [276] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name head> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<rev-parse>} {<--quiet>} {<--verify>} {(DQ ($ Id.VSub_DollarName '$local'))} ) ) } ) ) } spids: [306] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$head'))}) (C {<die>} {(DQ <'fatal: Not a valid revision: '> ($ Id.VSub_DollarName '$local'))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:headrev) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<rev-parse>} {<--verify>} {<--quiet>} {(DQ ($ Id.VSub_DollarName '$head')) <Id.Lit_Other '^'> <0>} ) ) } spids: [353] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$headrev'))}) (C {<die>} {(DQ <'fatal: Ambiguous revision: '> ($ Id.VSub_DollarName '$local'))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:branch_name) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name head> suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {<refs> <Id.Lit_Slash '/'> <heads> <Id.Lit_Slash '/'>} ) ) } spids: [391] ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<test>} {(DQ <z> ($ Id.VSub_DollarName '$branch_name'))} {<Id.Lit_Equals '='>} {(DQ <z> ($ Id.VSub_DollarName '$headref'))} ) (command.Pipeline children: [ (command.Simple words: [ {<git>} {<config>} {(DQ <branch.> ($ Id.VSub_DollarName '$branch_name') <.description>)} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: T ) ] ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:branch_name) op: assign_op.Equal rhs: (word.Empty) spids: [438] ) ] ) ] spids: [401 435] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:merge_base) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<merge-base>} {($ Id.VSub_DollarName '$baserev')} {($ Id.VSub_DollarName '$headrev')} ) ) } spids: [443] ) ] ) (C {<die>} { (DQ <'fatal: No commits in common between '> ($ Id.VSub_DollarName '$base') <' and '> ($ Id.VSub_DollarName '$head') ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:find_matching_ref) op: assign_op.Equal rhs: { (SQ <'\n'> <'\tmy ($head,$headrev) = (@ARGV);\n'> <'\tmy ($found);\n'> <'\n'> <'\twhile (<STDIN>) {\n'> <'\t\tchomp;\n'> <'\t\tmy ($sha1, $ref, $deref) = /^(\\S+)\\s+([^^]+)(\\S*)$/;\n'> <'\t\tmy ($pattern);\n'> <'\t\tnext unless ($sha1 eq $headrev);\n'> <'\n'> <'\t\t$pattern="/$head\\$";\n'> <'\t\tif ($ref eq $head) {\n'> <'\t\t\t$found = $ref;\n'> <'\t\t}\n'> <'\t\tif ($ref =~ /$pattern/) {\n'> <'\t\t\t$found = $ref;\n'> <'\t\t}\n'> <'\t\tif ($sha1 eq $head) {\n'> <'\t\t\t$found = $sha1;\n'> <'\t\t}\n'> <'\t}\n'> <'\tif ($found) {\n'> <'\t\tprint "$found\\n";\n'> <'\t}\n'> ) } spids: [481] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ref) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<git>} {<ls-remote>} {(DQ ($ Id.VSub_DollarName '$url'))}) (C {<Id.Lit_Other '@'> <Id.Lit_Splice '@PERL'> <Id.Lit_Other '@'> <Id.Lit_Other '@'> } {<-e>} {(DQ ($ Id.VSub_DollarName '$find_matching_ref'))} { (DQ (braced_var_sub token: <Id.VSub_Name remote> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<HEAD>}) ) ) } {(DQ ($ Id.VSub_DollarName '$headrev'))} ) ] negated: F ) ) } spids: [510] ) ] ) (command.If arms: [ (if_arm cond: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$ref'))})] action: [ (command.Simple words: [ {<echo>} { (DQ <'warn: No match for commit '> ($ Id.VSub_DollarName '$headrev') <' found at '> ($ Id.VSub_DollarName '$url') ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [ {<echo>} { (DQ <'warn: Are you sure you pushed \''> (braced_var_sub token: <Id.VSub_Name remote> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<HEAD>}) ) <'\' there?'> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:status) op: assign_op.Equal rhs: {<1>} spids: [589] ) ] ) ] spids: [547 557] ) ] ) (command.If arms: [ (if_arm cond: [ (C {<test>} {(DQ ($ Id.VSub_DollarName '$ref'))} {<Id.Lit_Equals '='>} {(DQ <'refs/tags/'> ($ Id.VSub_DollarName '$pretty_remote'))} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pretty_remote) op: assign_op.Equal rhs: {<'tags/'> ($ Id.VSub_DollarName '$pretty_remote')} spids: [616] ) ] ) ] spids: [598 613] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<ls-remote>} {<--get-url>} {(DQ ($ Id.VSub_DollarName '$url'))}) ) } spids: [623] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe] children: [ (C {<git>} {<show>} {<-s>} {<--format> <Id.Lit_Equals '='> (SQ <'The following changes since commit %H:\n'> <'\n'> <' %s (%ci)\n'> <'\n'> <'are available in the git repository at:\n'> ) } {($ Id.VSub_DollarName '$merge_base')} ) (C {<echo>} {(DQ <' '> ($ Id.VSub_DollarName '$url') <' '> ($ Id.VSub_DollarName '$pretty_remote'))} ) (C {<git>} {<show>} {<-s>} {<--format> <Id.Lit_Equals '='> (SQ <'\n'> <'for you to fetch changes up to %H:\n'> <'\n'> <' %s (%ci)\n'> <'\n'> <----------------------------------------------------------------> ) } {($ Id.VSub_DollarName '$headrev')} ) (command.If arms: [ (if_arm cond: [ (C {<test>} { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<cat-file>} {<-t>} {(DQ ($ Id.VSub_DollarName '$head'))}) ) } {<Id.Lit_Equals '='>} {<tag>} ) ] action: [ (command.Pipeline children: [ (C {<git>} {<cat-file>} {<tag>} {(DQ ($ Id.VSub_DollarName '$head'))}) (C {<sed>} {<-n>} {<-e>} {(SQ <'1,/^$/d'>)} {<-e>} {(SQ <'/^-----BEGIN PGP /q'>)} {<-e>} {<p>} ) ] negated: F ) (C {<echo>}) (C {<echo>} {(DQ <---------------------------------------------------------------->)}) ] spids: [690 710] ) ] ) (command.If arms: [ (if_arm cond: [(C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$branch_name'))})] action: [ (C {<echo>} { (DQ <'(from the branch description for '> ($ Id.VSub_DollarName '$branch_name') <' local branch)'> ) } ) (C {<echo>}) (C {<git>} {<config>} {(DQ <branch.> ($ Id.VSub_DollarName '$branch_name') <.description>)} ) (C {<echo>} {(DQ <---------------------------------------------------------------->)}) ] spids: [761 771] ) ] ) (C {<git>} {<shortlog>} {<Id.Lit_Other '^'> ($ Id.VSub_DollarName '$baserev')} {($ Id.VSub_DollarName '$headrev')} ) (C {<git>} {<diff>} {<-M>} {<--stat>} {<--summary>} {($ Id.VSub_DollarName '$patch')} {($ Id.VSub_DollarName '$merge_base') <..> ($ Id.VSub_DollarName '$headrev')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:status) op: assign_op.Equal rhs: {<1>} spids: [837] ) ] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$status')} ) ] )