(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: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [(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:<Id.ControlFlow_Break break>)]
                  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: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$quilt_author'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          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: <Id.Left_DollarParen '$('>
                            child: 
                              (C {<expr>} {(DQ <z> ($ Id.VSub_DollarName '$quilt_author'))} 
                                {<Id.Lit_Colon ':'>} {(SQ <'z\\(.*[^ ]\\) *<.*'>)}
                              )
                          )
                        }
                      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: <Id.Left_DollarParen '$('>
                            child: 
                              (C {<expr>} {(DQ <z> ($ Id.VSub_DollarName '$quilt_author'))} 
                                {<Id.Lit_Colon ':'>} {(SQ <'.*<\\([^>]*\\)'>)}
                              )
                          )
                        }
                      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_Colon ':'>} 
      {
        (braced_var_sub
          token: <Id.VSub_Name QUILT_PATCHES>
          suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonEquals arg_word:{<patches>})
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ ($ Id.VSub_DollarName '$QUILT_PATCHES'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                      negated: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} 
              {
                (DQ <'The '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                  ($ Id.VSub_DollarName '$QUILT_PATCHES') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' directory does not exist.'>
                )
              }
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [255 271]
        )
      ]
    )
    (C {<Id.Lit_Colon ':'>} 
      {
        (braced_var_sub
          token: <Id.VSub_Name QUILT_SERIES>
          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: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (C {<Id.Lit_LBracket '['>} {<-e>} {(DQ ($ Id.VSub_DollarName '$QUILT_SERIES'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                      negated: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} 
              {
                (DQ <'The '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                  ($ Id.VSub_DollarName '$QUILT_SERIES') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' file does not exist.'>
                )
              }
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> 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: <Id.Left_DollarParen '$('>
                child: (C {<git>} {<rev-parse>} {<HEAD>})
              )
            }
          spids: [374]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<mkdir>} {($ Id.VSub_DollarName '$tmp_dir')})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<2>})
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Simple
              words: [{<read>} {<patch_name>} {<level>} {<garbage>}]
              redirects: [(redir op:<Id.Redir_LessAnd '<&'> loc:(redir_loc.Fd fd:0) arg:{<3>})]
              do_fork: T
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$patch_name'))}
              arms: [
                (case_arm
                  pat_list: [{(SQ )} {(SQ <'#'>) <Id.Lit_Star '*'>}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)]
                  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 <'#'>) <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 <'#'>) <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: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [501 502 516 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (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: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {(DQ ($ Id.VSub_DollarName '$patch_name') <' doesn\'t exist. Skipping.'>)}
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Continue continue>)
                  ]
                  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
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: 
                        {
                          (DQ ($ Id.VSub_DollarName '$QUILT_PATCHES') <'/'> 
                            ($ Id.VSub_DollarName '$patch_name')
                          )
                        }
                    )
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(DQ ($ Id.VSub_DollarName '$tmp_info'))}
                    )
                  ]
                  do_fork: T
                )
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {<-s>} {(DQ ($ Id.VSub_DollarName '$tmp_patch'))})
                (BraceGroup
                  children: [
                    (C {<echo>} {(DQ <'Patch is empty.  Was it split wrong?'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      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: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<sed>} {<-ne>} {(SQ <'s/Author: //p'>)} 
                            {(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: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<sed>} {<-ne>} {(SQ <'s/Email: //p'>)} 
                            {(DQ ($ Id.VSub_DollarName '$tmp_info'))}
                          )
                      )
                    }
                  spids: [644]
                )
              ]
            )
            (C {<export>} {<GIT_AUTHOR_NAME>} {<GIT_AUTHOR_EMAIL>})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (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: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-n>} 
                                      {(DQ ($ Id.VSub_DollarName '$quilt_author'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          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: <Id.Op_Semi _>
                            )
                            (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: <Id.Op_Semi _>
                            )
                          ]
                          spids: [692 706]
                        )
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-n>} 
                                      {(DQ ($ Id.VSub_DollarName '$dry_run'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  words: [
                                    {<echo>}
                                    {
                                      (DQ <'No author found in '> ($ Id.VSub_DollarName '$patch_name'))
                                    }
                                  ]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_GreatAnd '>&'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<2>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (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: <Id.Op_Semi _>
                            )
                            (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: <Id.Op_Semi _>
                            )
                          ]
                          spids: [723 736]
                        )
                      ]
                      else_action: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              words: [
                                {<echo>}
                                {(DQ <'No author found in '> ($ Id.VSub_DollarName '$patch_name'))}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_GreatAnd '>&'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<2>}
                                )
                              ]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                        (C {<echo>} {(DQ <--->)})
                        (C {<cat>} {($ Id.VSub_DollarName '$tmp_msg')})
                        (command.Sentence
                          child: (C {<printf>} {(DQ <'Author: '>)})
                          terminator: <Id.Op_Semi _>
                        )
                        (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: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<expr>} {(DQ <z> ($ Id.VSub_DollarName '$patch_author'))} 
                                            {<Id.Lit_Colon ':'>} {(SQ <'z\\(.*[^ ]\\) *<.*'>)}
                                          )
                                      )
                                    }
                                  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: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<expr>} {(DQ <z> ($ Id.VSub_DollarName '$patch_author'))} 
                                            {<Id.Lit_Colon ':'>} {(SQ <'.*<\\([^>]*\\)'>)}
                                          )
                                      )
                                    }
                                  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: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<sed>} {<-ne>} {(SQ <'s/Date: //p'>)} 
                            {(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: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<sed>} {<-ne>} {(SQ <'s/Subject: //p'>)} 
                            {(DQ ($ Id.VSub_DollarName '$tmp_info'))}
                          )
                      )
                    }
                  spids: [918]
                )
              ]
            )
            (C {<export>} {<GIT_AUTHOR_DATE>} {<SUBJECT>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$SUBJECT'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SUBJECT)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<echo>} {($ Id.VSub_DollarName '$patch_name')})
                                      (C {<sed>} {<-e>} {(SQ <'s/.patch$//'>)})
                                    ]
                                    negated: F
                                  )
                              )
                            }
                          spids: [958]
                        )
                      ]
                    )
                  ]
                  spids: [941 955]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$dry_run'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  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: <Id.VSub_Name level>
                              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: <Id.Left_DollarParen '$('>
                                    child: (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: <Id.Left_DollarParen '$('>
                                    child: 
                                      (command.Pipeline
                                        children: [
                                          (command.Subshell
                                            child: 
                                              (command.CommandList
                                                children: [
                                                  (command.Sentence
                                                    child: 
                                                      (C {<echo>} 
                                                        {(DQ ($ Id.VSub_DollarName '$SUBJECT'))}
                                                      )
                                                    terminator: <Id.Op_Semi _>
                                                  )
                                                  (command.Sentence
                                                    child: (C {<echo>})
                                                    terminator: <Id.Op_Semi _>
                                                  )
                                                  (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: <Id.ControlFlow_Exit exit>
                          arg_word: {<4>}
                        )
                      ]
                    )
                  ]
                  spids: [980 994]
                )
              ]
            )
          ]
        )
      redirects: [
        (redir
          op: <Id.Redir_Less '3<'>
          loc: (redir_loc.Fd fd:3)
          arg: {(DQ ($ Id.VSub_DollarName '$QUILT_SERIES'))}
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<rm>} {<-rf>} {($ Id.VSub_DollarName '$tmp_dir')})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<5>})
      ]
    )
  ]
)