(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:USAGE)
          op: Equal
          rhs: {(SQ <'<start> <url> [<end>]'>)}
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LONG_USAGE)
          op: Equal
          rhs: 
            {
              (SQ <'Summarizes the changes between two commits to the standard output,\n'> 
                <'and includes the given URL in the generated summary.'>
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:SUBDIRECTORY_OK) op:Equal rhs:{(SQ <Yes>)})]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:OPTIONS_KEEPDASHDASH) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:OPTIONS_STUCKLONG) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OPTIONS_SPEC)
          op: Equal
          rhs: 
            {
              (SQ <'git request-pull [options] start url [end]\n'> <'--\n'> 
                <'p    show patch text as well\n'>
              )
            }
        )
      ]
    )
    (C {(.)} {(git-sh-setup)})
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:GIT_PAGER) op:Equal rhs:(word.Empty))]
    )
    (C {(export)} {(GIT_PAGER)})
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:patch) op:Equal rhs:(word.Empty))]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [
        (command.Case
          to_match: {(DQ ($ VSub_Pound '$#'))}
          arms: [
            (case_arm
              pat_list: [{(0)}]
              action: [(command.ControlFlow token:<ControlFlow_Break break>)]
            )
          ]
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(-p)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:patch) op:Equal rhs:{(-p)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--)}]
                  action: [
                    (command.Sentence
                      child: (C {(shift)})
                      terminator: <Op_Semi ';'>
                    )
                    (command.ControlFlow token:<ControlFlow_Break break>)
                  ]
                )
                (case_arm pat_list:[{(-) (Lit_Star '*')}] action:[(C {(usage)})])
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [(command.ControlFlow token:<ControlFlow_Break break>)]
                )
              ]
            )
            (C {(shift)})
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair lhs:(sh_lhs_expr.Name name:base) op:Equal rhs:{($ VSub_Number '$1')})
        (assign_pair lhs:(sh_lhs_expr.Name name:url) op:Equal rhs:{($ VSub_Number '$2')})
        (assign_pair lhs:(sh_lhs_expr.Name name:status) op:Equal rhs:{(0)})
      ]
    )
    (command.AndOr
      ops: [Op_DAmp Op_DPipe]
      children: [
        (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$base'))})
        (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$url'))})
        (C {(usage)})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:baserev)
          op: Equal
          rhs: 
            {
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(git)} {(rev-parse)} {(--verify)} {(--quiet)} 
                        {(DQ ($ VSub_DollarName '$base')) (Lit_Other '^') (0)}
                      )
                    ]
                  )
              )
            }
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$baserev'))})]
          action: [(C {(die)} {(DQ ('fatal: Not a valid revision: ') ($ VSub_DollarName '$base'))})]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:local)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Number 3>
                suffix_op: (suffix_op.Unary op_id:VOp1_Percent arg_word:{(':*')})
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:local)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Name local>
                suffix_op: (suffix_op.Unary op_id:VTest_ColonHyphen arg_word:{(HEAD)})
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:remote)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Number 3>
                suffix_op: (suffix_op.Unary op_id:VOp1_Pound arg_word:{('*:')})
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pretty_remote)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Name remote>
                suffix_op: (suffix_op.Unary op_id:VOp1_Pound arg_word:{(refs) (Lit_Slash /)})
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pretty_remote)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Name pretty_remote>
                suffix_op: (suffix_op.Unary op_id:VOp1_Pound arg_word:{(heads) (Lit_Slash /)})
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:head)
          op: Equal
          rhs: 
            {
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(symbolic-ref)} {(-q)} {(DQ ($ VSub_DollarName '$local'))})]
                  )
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:head)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Name head>
                suffix_op: 
                  (suffix_op.Unary
                    op_id: VTest_ColonHyphen
                    arg_word: 
                      {
                        (command_sub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(git)} {(show-ref)} {(--heads)} {(--tags)} 
                                      {(DQ ($ VSub_DollarName '$local'))}
                                    )
                                    (C {(cut)} {(-d) (SQ <' '>)} {(-f2)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      }
                  )
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:head)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Name head>
                suffix_op: 
                  (suffix_op.Unary
                    op_id: VTest_ColonHyphen
                    arg_word: 
                      {
                        (command_sub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [
                                (C {(git)} {(rev-parse)} {(--quiet)} {(--verify)} 
                                  {(DQ ($ VSub_DollarName '$local'))}
                                )
                              ]
                            )
                        )
                      }
                  )
              )
            }
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$head'))})
        (C {(die)} {(DQ ('fatal: Not a valid revision: ') ($ VSub_DollarName '$local'))})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:headrev)
          op: Equal
          rhs: 
            {
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(git)} {(rev-parse)} {(--verify)} {(--quiet)} 
                        {(DQ ($ VSub_DollarName '$head')) (Lit_Other '^') (0)}
                      )
                    ]
                  )
              )
            }
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$headrev'))})
        (C {(die)} {(DQ ('fatal: Ambiguous revision: ') ($ VSub_DollarName '$local'))})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:branch_name)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Name head>
                suffix_op: 
                  (suffix_op.Unary
                    op_id: VOp1_Pound
                    arg_word: {(refs) (Lit_Slash /) (heads) (Lit_Slash /)}
                  )
              )
            }
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} {(DQ (z) ($ VSub_DollarName '$branch_name'))} {(Lit_Equals '=')} 
                  {(DQ (z) ($ VSub_DollarName '$headref'))}
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      words: [
                        {(git)}
                        {(config)}
                        {(DQ (branch.) ($ VSub_DollarName '$branch_name') (.description))}
                      ]
                      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})]
                    )
                  ]
                  negated: T
                )
              ]
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:branch_name) op:Equal rhs:(word.Empty))]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:merge_base)
              op: Equal
              rhs: 
                {
                  (command_sub
                    left_token: <Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [
                          (C {(git)} {(merge-base)} {($ VSub_DollarName '$baserev')} 
                            {($ VSub_DollarName '$headrev')}
                          )
                        ]
                      )
                  )
                }
            )
          ]
        )
        (C {(die)} 
          {
            (DQ ('fatal: No commits in common between ') ($ VSub_DollarName '$base') (' and ') 
              ($ VSub_DollarName '$head')
            )
          }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:find_matching_ref)
          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'>
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ref)
          op: Equal
          rhs: 
            {
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Pipeline
                        children: [
                          (C {(git)} {(ls-remote)} {(DQ ($ VSub_DollarName '$url'))})
                          (C {(Lit_Other '@') (Lit_Splice '@PERL') (Lit_Other '@') (Lit_Other '@')} 
                            {(-e)} {(DQ ($ VSub_DollarName '$find_matching_ref'))} 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: <VSub_Name remote>
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op_id: VTest_ColonHyphen
                                      arg_word: {(HEAD)}
                                    )
                                )
                              )
                            } {(DQ ($ VSub_DollarName '$headrev'))}
                          )
                        ]
                        negated: F
                      )
                    ]
                  )
              )
            }
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$ref'))})]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('warn: No match for commit ') ($ VSub_DollarName '$headrev') (' found at ') 
                    ($ VSub_DollarName '$url')
                  )
                }
              ]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ("warn: Are you sure you pushed '") 
                    (braced_var_sub
                      token: <VSub_Name remote>
                      suffix_op: (suffix_op.Unary op_id:VTest_ColonHyphen arg_word:{(HEAD)})
                    ) ("' there?")
                  )
                }
              ]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:status) op:Equal rhs:{(1)})]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (C {(test)} {(DQ ($ VSub_DollarName '$ref'))} {(Lit_Equals '=')} 
              {(DQ (refs/tags/) ($ VSub_DollarName '$pretty_remote'))}
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pretty_remote)
                  op: Equal
                  rhs: {(tags/) ($ VSub_DollarName '$pretty_remote')}
                )
              ]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:url)
          op: Equal
          rhs: 
            {
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(ls-remote)} {(--get-url)} {(DQ ($ VSub_DollarName '$url'))})]
                  )
              )
            }
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DPipe]
      children: [
        (C {(git)} {(show)} {(-s)} 
          {(--format) (Lit_Equals '=') 
            (SQ <'The following changes since commit %H:\n'> <'\n'> <'  %s (%ci)\n'> <'\n'> 
              <'are available in the git repository at:\n'>
            )
          } {($ VSub_DollarName '$merge_base')}
        )
        (C {(echo)} {(DQ ('  ') ($ VSub_DollarName '$url') (' ') ($ VSub_DollarName '$pretty_remote'))})
        (C {(git)} {(show)} {(-s)} 
          {(--format) (Lit_Equals '=') 
            (SQ <'\n'> <'for you to fetch changes up to %H:\n'> <'\n'> <'  %s (%ci)\n'> <'\n'> 
              <---------------------------------------------------------------->
            )
          } {($ VSub_DollarName '$headrev')}
        )
        (command.If
          arms: [
            (if_arm
              cond: [
                (C {(test)} 
                  {
                    (command_sub
                      left_token: <Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {(git)} {(cat-file)} {(-t)} {(DQ ($ VSub_DollarName '$head'))})]
                        )
                    )
                  } {(Lit_Equals '=')} {(tag)}
                )
              ]
              action: [
                (command.Pipeline
                  children: [
                    (C {(git)} {(cat-file)} {(tag)} {(DQ ($ VSub_DollarName '$head'))})
                    (C {(sed)} {(-n)} {(-e)} {(SQ <'1,/^$/d'>)} {(-e)} {(SQ <'/^-----BEGIN PGP /q'>)} {(-e)} 
                      {(p)}
                    )
                  ]
                  negated: F
                )
                (C {(echo)})
                (C {(echo)} {(DQ (----------------------------------------------------------------))})
              ]
            )
          ]
        )
        (command.If
          arms: [
            (if_arm
              cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$branch_name'))})]
              action: [
                (C {(echo)} 
                  {
                    (DQ ('(from the branch description for ') ($ VSub_DollarName '$branch_name') 
                      (' local branch)')
                    )
                  }
                )
                (C {(echo)})
                (C {(git)} {(config)} {(DQ (branch.) ($ VSub_DollarName '$branch_name') (.description))})
                (C {(echo)} {(DQ (----------------------------------------------------------------))})
              ]
            )
          ]
        )
        (C {(git)} {(shortlog)} {(Lit_Other '^') ($ VSub_DollarName '$baserev')} 
          {($ VSub_DollarName '$headrev')}
        )
        (C {(git)} {(diff)} {(-M)} {(--stat)} {(--summary)} {($ VSub_DollarName '$patch')} 
          {($ VSub_DollarName '$merge_base') (..) ($ VSub_DollarName '$headrev')}
        )
        (command.ShAssignment
          pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:status) op:Equal rhs:{(1)})]
        )
      ]
    )
    (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_DollarName '$status')})
  ]
)