(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:me)
          op: assign_op.Equal
          rhs: {<rerere-train>}
          spids: [10]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:USAGE)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$me') <' rev-list-args'>)}
          spids: [13]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SUBDIRECTORY_OK)
          op: assign_op.Equal
          rhs: {<Yes>}
          spids: [20]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OPTIONS_SPEC)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [23]
        )
      ]
    )
    (C {<.>} 
      {
        (DQ 
          (command_sub
            left_token: <Id.Left_DollarParen '$('>
            command_list: (command.CommandList children:[(C {<git>} {<--exec-path>})])
          ) </git-sh-setup>
        )
      }
    )
    (C {<require_work_tree>})
    (C {<cd_to_toplevel>})
    (command.AndOr
      ops: [Id.Op_DPipe Id.Op_DPipe]
      children: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:branch)
              op: assign_op.Equal
              rhs: 
                {
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [(C {<git>} {<symbolic-ref>} {<-q>} {<HEAD>})]
                      )
                  )
                }
              spids: [44]
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:original_HEAD)
              op: assign_op.Equal
              rhs: 
                {
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [(C {<git>} {<rev-parse>} {<--verify>} {<HEAD>})]
                      )
                  )
                }
              spids: [57]
            )
          ]
        )
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{<echo>} {(DQ <'Not on any branch and no commit yet?'>)}]
              redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') </rr-cache>)})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
      ]
    )
    (command.Pipeline
      children: [
        (C {<git>} {<rev-list>} {<--parents>} {(DQ ($ Id.VSub_At '$@'))})
        (command.WhileUntil
          keyword: <Id.KW_While while>
          cond: [(C {<read>} {<commit>} {<parent1>} {<other_parents>})]
          body: 
            (command.DoGroup
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$other_parents'))})]
                      action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)]
                      spids: [129 140]
                    )
                  ]
                )
                (C {<git>} {<checkout>} {<-q>} {(DQ ($ Id.VSub_DollarName '$parent1') <'^0'>)})
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Simple
                          words: [{<git>} {<merge>} {($ Id.VSub_DollarName '$other_parents')}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_Great '>'>
                              fd: -1
                              arg_word: {</dev/null>}
                            )
                            (redir.Redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              fd: 2
                              arg_word: {<1>}
                            )
                          ]
                        )
                      ]
                      action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)]
                      spids: [165 180]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [(C {<test>} {<-s>} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') </MERGE_RR>)})]
                      action: [
                        (C {<git>} {<show>} {<-s>} 
                          {<--pretty> <Id.Lit_Equals '='> <format> <Id.Lit_Other ':'> 
                            (DQ <'Learning from %h %s'>)
                          } {(DQ ($ Id.VSub_DollarName '$commit'))}
                        )
                        (C {<git>} {<rerere>})
                        (C {<git>} {<checkout>} {<-q>} {($ Id.VSub_DollarName '$commit')} {<-->} {<.>})
                        (C {<git>} {<rerere>})
                      ]
                      spids: [193 205]
                    )
                  ]
                )
                (C {<git>} {<reset>} {<-q>} {<--hard>})
              ]
            )
        )
      ]
      negated: F
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$branch'))})]
          action: [(C {<git>} {<checkout>} {(DQ ($ Id.VSub_DollarName '$original_HEAD'))})]
          spids: [264 274]
        )
      ]
      else_action: [
        (C {<git>} {<checkout>} 
          {
            (DQ 
              (braced_var_sub
                token: <Id.VSub_Name branch>
                suffix_op: 
                  (suffix_op.Unary
                    op_id: Id.VOp1_Pound
                    arg_word: {<refs> <Id.Lit_Slash /> <heads> <Id.Lit_Slash />}
                  )
              )
            )
          }
        )
      ]
    )
  ]
)