(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OPTIONS_KEEPDASHDASH)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [3]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OPTIONS_STUCKLONG)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [5]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OPTIONS_SPEC)
          op: assign_op.Equal
          rhs: 
            {
              (DQ ('git quiltimport [options]\n') ('--\n') ('n,dry-run     dry run\n') 
                ('author=       author name and email address for patches without any\n') ('patches=      path to the quilt patches\n') ('series=       path to the quilt series file\n')
              )
            }
          spids: [7]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SUBDIRECTORY_ON)
          op: assign_op.Equal
          rhs: {(Yes)}
          spids: [18]
        )
      ]
    )
    (C {(.)} {(git-sh-setup)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:dry_run)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [26]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:quilt_author)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [30]
        )
      ]
    )
    (command.WhileUntil
      keyword: (Token id:Id.KW_While val:while span_id:34)
      cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)})]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(--author)}]
                  action: [
                    (C {(shift)})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:quilt_author)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number '$1'))}
                          spids: [64]
                        )
                      ]
                    )
                  ]
                  spids: [57 58 70 -1]
                )
                (case_arm
                  pat_list: [{(-n)} {(--dry-run)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:dry_run)
                          op: assign_op.Equal
                          rhs: {(1)}
                          spids: [79]
                        )
                      ]
                    )
                  ]
                  spids: [73 76 83 -1]
                )
                (case_arm
                  pat_list: [{(--patches)}]
                  action: [
                    (C {(shift)})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:QUILT_PATCHES)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number '$1'))}
                          spids: [93]
                        )
                      ]
                    )
                  ]
                  spids: [86 87 99 -1]
                )
                (case_arm
                  pat_list: [{(--series)}]
                  action: [
                    (C {(shift)})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:QUILT_SERIES)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number '$1'))}
                          spids: [109]
                        )
                      ]
                    )
                  ]
                  spids: [102 103 115 -1]
                )
                (case_arm
                  pat_list: [{(--)}]
                  action: [
                    (C {(shift)})
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Break val:break span_id:125)
                    )
                  ]
                  spids: [118 119 126 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [(C {(usage)})]
                  spids: [129 130 136 -1]
                )
              ]
            )
            (C {(shift)})
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(-n)} {(DQ ($ Id.VSub_DollarName '$quilt_author'))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:162)
            )
          ]
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:quilt_author_name)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:168)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(expr)} {(DQ (z) ($ Id.VSub_DollarName '$quilt_author'))} 
                                    {(Id.Lit_Other ':')} {(SQ (Token id:Id.Lit_Chars val:'z\\(.*[^ ]\\) *<.*' span_id:179))}
                                  )
                                ]
                              )
                          )
                        }
                      spids: [167]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:quilt_author_email)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:187)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(expr)} {(DQ (z) ($ Id.VSub_DollarName '$quilt_author'))} 
                                    {(Id.Lit_Other ':')} {(SQ (Token id:Id.Lit_Chars val:'.*<\\([^>]*\\)' span_id:198))}
                                  )
                                ]
                              )
                          )
                        }
                      spids: [186]
                    )
                  ]
                )
                (C {(test)} {(SQ )} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} 
                  {(DQ ($ Id.VSub_DollarName '$quilt_author_name'))}
                )
                (C {(test)} {(SQ )} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} 
                  {(DQ ($ Id.VSub_DollarName '$quilt_author_email'))}
                )
                (C {(die)} {(DQ ('malformed --author parameter'))})
              ]
            )
          ]
          spids: [150 164]
        )
      ]
    )
    (C {(Id.Lit_Other ':')} 
      {
        (braced_var_sub
          token: (Token id:Id.VSub_Name val:QUILT_PATCHES span_id:250)
          suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonEquals arg_word:{(patches)})
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (C {(Id.Lit_LBracket '[')} {(-d)} {(DQ ($ Id.VSub_DollarName '$QUILT_PATCHES'))} 
                      {(Id.Lit_RBracket ']')}
                    )
                  ]
                  negated: T
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:269)
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('The ') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:278)
                  ) ($ Id.VSub_DollarName '$QUILT_PATCHES') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:280)
                  ) (' directory does not exist.')
                )
              }
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:285)
              arg_word: {(1)}
            )
          ]
          spids: [255 271]
        )
      ]
    )
    (C {(Id.Lit_Other ':')} 
      {
        (braced_var_sub
          token: (Token id:Id.VSub_Name val:QUILT_SERIES span_id:298)
          suffix_op: 
            (suffix_op.Unary
              op_id: Id.VTest_ColonEquals
              arg_word: {($ Id.VSub_DollarName '$QUILT_PATCHES') (Id.Lit_Slash /) (series)}
            )
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (C {(Id.Lit_LBracket '[')} {(-e)} {(DQ ($ Id.VSub_DollarName '$QUILT_SERIES'))} 
                      {(Id.Lit_RBracket ']')}
                    )
                  ]
                  negated: T
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:319)
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('The ') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:328)
                  ) ($ Id.VSub_DollarName '$QUILT_SERIES') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:330)
                  ) (' file does not exist.')
                )
              }
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:335)
              arg_word: {(1)}
            )
          ]
          spids: [305 321]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tmp_dir)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$GIT_DIR')) (/rebase-apply)}
          spids: [345]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tmp_msg)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$tmp_dir') (/msg))}
          spids: [351]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tmp_patch)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$tmp_dir') (/patch))}
          spids: [357]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tmp_info)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$tmp_dir') (/info))}
          spids: [363]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:commit)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:375)
                command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})])
              )
            }
          spids: [374]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(mkdir)} {($ Id.VSub_DollarName '$tmp_dir')})
        (command.ControlFlow
          token: (Token id:Id.ControlFlow_Exit val:exit span_id:390)
          arg_word: {(2)}
        )
      ]
    )
    (command.WhileUntil
      keyword: (Token id:Id.KW_While val:while span_id:394)
      cond: [
        (command.Simple
          words: [{(read)} {(patch_name)} {(level)} {(garbage)}]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_LessAnd val:'<&' span_id:404)
              fd: -1
              arg_word: {(3)}
            )
          ]
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$patch_name'))}
              arms: [
                (case_arm
                  pat_list: [
                    {(SQ )}
                    {(SQ (Token id:Id.Lit_Chars val:'#' span_id:422)) (Id.Lit_Star '*')}
                  ]
                  action: [
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Continue val:continue span_id:427)
                    )
                  ]
                  spids: [418 425 428 -1]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$level'))}
              arms: [
                (case_arm pat_list:[{(-p) (Id.Lit_Star '*')}] spids:[442 444 446 -1])
                (case_arm
                  pat_list: [
                    {(SQ )}
                    {(SQ (Token id:Id.Lit_Chars val:'#' span_id:453)) (Id.Lit_Star '*')}
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:level)
                          op: assign_op.Equal
                          rhs: (word.Empty)
                          spids: [459]
                        )
                      ]
                    )
                  ]
                  spids: [449 456 460 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (C {(echo)} {(DQ ('unable to parse patch level, ignoring it.'))})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:level)
                          op: assign_op.Equal
                          rhs: (word.Empty)
                          spids: [474]
                        )
                      ]
                    )
                  ]
                  spids: [463 464 475 -1]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$garbage'))}
              arms: [
                (case_arm
                  pat_list: [
                    {(SQ )}
                    {(SQ (Token id:Id.Lit_Chars val:'#' span_id:494)) (Id.Lit_Star '*')}
                  ]
                  spids: [490 497 498 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ('trailing garbage found in series file: ') 
                          ($ Id.VSub_DollarName '$garbage')
                        )
                      }
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:513)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [501 502 516 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {(Id.Lit_LBracket '[')} {(-f)} 
                              {
                                (DQ ($ Id.VSub_DollarName '$QUILT_PATCHES') (/) 
                                  ($ Id.VSub_DollarName '$patch_name')
                                )
                              } {(Id.Lit_RBracket ']')}
                            )
                          ]
                          negated: T
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:538)
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {(DQ ($ Id.VSub_DollarName '$patch_name') (" doesn't exist. Skipping."))}
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Continue val:continue span_id:551)
                    )
                  ]
                  spids: [522 540]
                )
              ]
            )
            (C {(echo)} {($ Id.VSub_DollarName '$patch_name')})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {(git)}
                    {(mailinfo)}
                    {(DQ ($ Id.VSub_DollarName '$tmp_msg'))}
                    {(DQ ($ Id.VSub_DollarName '$tmp_patch'))}
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Less val:'<' span_id:576)
                      fd: -1
                      arg_word: 
                        {
                          (DQ ($ Id.VSub_DollarName '$QUILT_PATCHES') (/) 
                            ($ Id.VSub_DollarName '$patch_name')
                          )
                        }
                    )
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:583)
                      fd: -1
                      arg_word: {(DQ ($ Id.VSub_DollarName '$tmp_info'))}
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:590)
                  arg_word: {(3)}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(-s)} {(DQ ($ Id.VSub_DollarName '$tmp_patch'))})
                (command.BraceGroup
                  children: [
                    (C {(echo)} {(DQ ('Patch is empty.  Was it split wrong?'))})
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:615)
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_NAME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:629)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(sed)} {(-ne)} 
                                {(SQ (Token id:Id.Lit_Chars val:'s/Author: //p' span_id:635))} {(DQ ($ Id.VSub_DollarName '$tmp_info'))}
                              )
                            ]
                          )
                      )
                    }
                  spids: [628]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_EMAIL)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:645)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(sed)} {(-ne)} 
                                {(SQ (Token id:Id.Lit_Chars val:'s/Email: //p' span_id:651))} {(DQ ($ Id.VSub_DollarName '$tmp_info'))}
                              )
                            ]
                          )
                      )
                    }
                  spids: [644]
                )
              ]
            )
            (C {(export)} {(GIT_AUTHOR_NAME)} {(GIT_AUTHOR_EMAIL)})
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:667)
              cond: [
                (command.Sentence
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$GIT_AUTHOR_EMAIL'))})
                        (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$GIT_AUTHOR_NAME'))})
                      ]
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:687)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Id.Lit_LBracket '[')} {(-n)} 
                                  {(DQ ($ Id.VSub_DollarName '$quilt_author'))} {(Id.Lit_RBracket ']')}
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:704)
                            )
                          ]
                          action: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_NAME)
                                      op: assign_op.Equal
                                      rhs: {(DQ ($ Id.VSub_DollarName '$quilt_author_name'))}
                                      spids: [709]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:713)
                            )
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_EMAIL)
                                      op: assign_op.Equal
                                      rhs: {(DQ ($ Id.VSub_DollarName '$quilt_author_email'))}
                                      spids: [716]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:720)
                            )
                          ]
                          spids: [692 706]
                        )
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Id.Lit_LBracket '[')} {(-n)} 
                                  {(DQ ($ Id.VSub_DollarName '$dry_run'))} {(Id.Lit_RBracket ']')}
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:734)
                            )
                          ]
                          action: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  words: [
                                    {(echo)}
                                    {
                                      (DQ ('No author found in ') ($ Id.VSub_DollarName '$patch_name'))
                                    }
                                  ]
                                  redirects: [
                                    (redir.Redir
                                      op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:746)
                                      fd: -1
                                      arg_word: {(2)}
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:748)
                            )
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_NAME)
                                      op: assign_op.Equal
                                      rhs: {(DQ (dry-run-not-found))}
                                      spids: [751]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:755)
                            )
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_EMAIL)
                                      op: assign_op.Equal
                                      rhs: {(DQ (dry-run-not-found))}
                                      spids: [758]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:762)
                            )
                          ]
                          spids: [723 736]
                        )
                      ]
                      else_action: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              words: [
                                {(echo)}
                                {(DQ ('No author found in ') ($ Id.VSub_DollarName '$patch_name'))}
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:775)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:777)
                        )
                        (C {(echo)} {(DQ (---))})
                        (C {(cat)} {($ Id.VSub_DollarName '$tmp_msg')})
                        (command.Sentence
                          child: (C {(printf)} {(DQ ('Author: '))})
                          terminator: (Token id:Id.Op_Semi val:';' span_id:797)
                        )
                        (C {(read)} {(patch_author)})
                        (C {(echo)} {(DQ ($ Id.VSub_DollarName '$patch_author'))})
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:patch_author_name)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: 
                                          (Token
                                            id: Id.Left_DollarParen
                                            val: '$('
                                            span_id: 815
                                          )
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(expr)} 
                                                {(DQ (z) ($ Id.VSub_DollarName '$patch_author'))} {(Id.Lit_Other ':')} {(SQ (Token id:Id.Lit_Chars val:'z\\(.*[^ ]\\) *<.*' span_id:826))}
                                              )
                                            ]
                                          )
                                      )
                                    }
                                  spids: [814]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:patch_author_email)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: 
                                          (Token
                                            id: Id.Left_DollarParen
                                            val: '$('
                                            span_id: 834
                                          )
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(expr)} 
                                                {(DQ (z) ($ Id.VSub_DollarName '$patch_author'))} {(Id.Lit_Other ':')} {(SQ (Token id:Id.Lit_Chars val:'.*<\\([^>]*\\)' span_id:845))}
                                              )
                                            ]
                                          )
                                      )
                                    }
                                  spids: [833]
                                )
                              ]
                            )
                            (C {(test)} {(SQ )} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} 
                              {(DQ ($ Id.VSub_DollarName '$patch_author_name'))}
                            )
                            (C {(test)} {(SQ )} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} 
                              {(DQ ($ Id.VSub_DollarName '$patch_author_email'))}
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_NAME)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$patch_author_name'))}
                                  spids: [882]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_EMAIL)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$patch_author_email'))}
                                  spids: [890]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_DATE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:903)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(sed)} {(-ne)} 
                                {(SQ (Token id:Id.Lit_Chars val:'s/Date: //p' span_id:909))} {(DQ ($ Id.VSub_DollarName '$tmp_info'))}
                              )
                            ]
                          )
                      )
                    }
                  spids: [902]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SUBJECT)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:919)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(sed)} {(-ne)} 
                                {(SQ (Token id:Id.Lit_Chars val:'s/Subject: //p' span_id:925))} {(DQ ($ Id.VSub_DollarName '$tmp_info'))}
                              )
                            ]
                          )
                      )
                    }
                  spids: [918]
                )
              ]
            )
            (C {(export)} {(GIT_AUTHOR_DATE)} {(SUBJECT)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$SUBJECT'))} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:953)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SUBJECT)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:959)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {(echo)} {($ Id.VSub_DollarName '$patch_name')})
                                          (C {(sed)} {(-e)} 
                                            {
                                              (SQ 
                                                (Token
                                                  id: Id.Lit_Chars
                                                  val: 's/.patch$//'
                                                  span_id: 971
                                                )
                                              )
                                            }
                                          )
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [958]
                        )
                      ]
                    )
                  ]
                  spids: [941 955]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$dry_run'))} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:992)
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe]
                      children: [
                        (C {(git)} {(apply)} {(--index)} {(-C1)} 
                          {
                            (braced_var_sub
                              token: (Token id:Id.VSub_Name val:level span_id:1006)
                              suffix_op: 
                                (suffix_op.Unary
                                  op_id: Id.VTest_ColonPlus
                                  arg_word: {(DQ ($ Id.VSub_DollarName '$level'))}
                                )
                            )
                          } {(DQ ($ Id.VSub_DollarName '$tmp_patch'))}
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:tree)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1021)
                                    command_list: 
                                      (command.CommandList
                                        children: [(C {(git)} {(write-tree)})]
                                      )
                                  )
                                }
                              spids: [1020]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:commit)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1031)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (command.Pipeline
                                            children: [
                                              (command.Subshell
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (command.Sentence
                                                        child: 
                                                          (C {(echo)} 
                                                            {(DQ ($ Id.VSub_DollarName '$SUBJECT'))}
                                                          )
                                                        terminator: 
                                                          (Token
                                                            id: Id.Op_Semi
                                                            val: ';'
                                                            span_id: 1039
                                                          )
                                                      )
                                                      (command.Sentence
                                                        child: (C {(echo)})
                                                        terminator: 
                                                          (Token
                                                            id: Id.Op_Semi
                                                            val: ';'
                                                            span_id: 1042
                                                          )
                                                      )
                                                      (C {(cat)} 
                                                        {(DQ ($ Id.VSub_DollarName '$tmp_msg'))}
                                                      )
                                                    ]
                                                  )
                                              )
                                              (C {(git)} {(commit-tree)} 
                                                {($ Id.VSub_DollarName '$tree')} {(-p)} {($ Id.VSub_DollarName '$commit')}
                                              )
                                            ]
                                            negated: F
                                          )
                                        ]
                                      )
                                  )
                                }
                              spids: [1030]
                            )
                          ]
                        )
                        (C {(git)} {(update-ref)} {(-m)} 
                          {(DQ ('quiltimport: ') ($ Id.VSub_DollarName '$patch_name'))} {(HEAD)} {($ Id.VSub_DollarName '$commit')}
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Exit val:exit span_id:1084)
                          arg_word: {(4)}
                        )
                      ]
                    )
                  ]
                  spids: [980 994]
                )
              ]
            )
          ]
        )
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Less val:'3<' span_id:1093)
          fd: 3
          arg_word: {(DQ ($ Id.VSub_DollarName '$QUILT_SERIES'))}
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(rm)} {(-rf)} {($ Id.VSub_DollarName '$tmp_dir')})
        (command.ControlFlow
          token: (Token id:Id.ControlFlow_Exit val:exit span_id:1106)
          arg_word: {(5)}
        )
      ]
    )
  ]
)