(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTIONS_KEEPDASHDASH) op:Equal rhs:(word.EmptyWord))]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTIONS_STUCKLONG) op:Equal rhs:(word.EmptyWord))]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:OPTIONS_SPEC)
          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')
              )
            }
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:SUBDIRECTORY_ON) op:Equal rhs:{(Yes)})]
    )
    (C {(.)} {(git-sh-setup)})
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:dry_run) op:Equal rhs:{(DQ )})]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:quilt_author) op:Equal rhs:{(DQ )})]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Pound '$#')} {(KW_Bang '!') (Lit_Other '=')} {(0)})]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(--author)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:quilt_author)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-n)} {(--dry-run)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:dry_run) op:Equal rhs:{(1)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--patches)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:QUILT_PATCHES)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--series)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:QUILT_SERIES)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--)}]
                  action: [(C {(shift)}) (command.ControlFlow token:<ControlFlow_Break break>)]
                )
                (case_arm pat_list:[{(Lit_Other '*')}] action:[(C {(usage)})])
              ]
            )
            (C {(shift)})
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$quilt_author'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DPipe]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:quilt_author_name)
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSubPart
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(expr)} {(DQ (z) ($ VSub_DollarName '$quilt_author'))} 
                                    {(Lit_Other ':')} {(SQ <'z\\(.*[^ ]\\) *<.*'>)}
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                          )
                        }
                    )
                  ]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:quilt_author_email)
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSubPart
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(expr)} {(DQ (z) ($ VSub_DollarName '$quilt_author'))} 
                                    {(Lit_Other ':')} {(SQ <'.*<\\([^>]*\\)'>)}
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                          )
                        }
                    )
                  ]
                )
                (C {(test)} {(SQ )} {(KW_Bang '!') (Lit_Other '=')} 
                  {(DQ ($ VSub_DollarName '$quilt_author_name'))}
                )
                (C {(test)} {(SQ )} {(KW_Bang '!') (Lit_Other '=')} 
                  {(DQ ($ VSub_DollarName '$quilt_author_email'))}
                )
                (C {(die)} {(DQ ('malformed --author parameter'))})
              ]
            )
          ]
        )
      ]
    )
    (C {(Lit_Other ':')} 
      {
        (word_part.BracedVarSub
          token: <VSub_Name QUILT_PATCHES>
          suffix_op: (suffix_op.StringUnary op_id:VTest_ColonEquals arg_word:{(patches)})
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_DollarName '$QUILT_PATCHES'))} 
                      {(Lit_Other ']')}
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('The ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                  ($ VSub_DollarName '$QUILT_PATCHES') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' directory does not exist.')
                )
              }
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
        )
      ]
    )
    (C {(Lit_Other ':')} 
      {
        (word_part.BracedVarSub
          token: <VSub_Name QUILT_SERIES>
          suffix_op: 
            (suffix_op.StringUnary
              op_id: VTest_ColonEquals
              arg_word: {($ VSub_DollarName '$QUILT_PATCHES') (Lit_Slash /) (series)}
            )
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (C {(Lit_Other '[')} {(-e)} {(DQ ($ VSub_DollarName '$QUILT_SERIES'))} 
                      {(Lit_Other ']')}
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('The ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                  ($ VSub_DollarName '$QUILT_SERIES') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' file does not exist.')
                )
              }
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tmp_dir)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_DIR')) (/rebase-apply)}
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tmp_msg)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$tmp_dir') (/msg))}
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tmp_patch)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$tmp_dir') (/patch))}
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tmp_info)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$tmp_dir') (/info))}
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:commit)
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: (command.CommandList children:[(C {(git)} {(rev-parse)} {(HEAD)})])
                left_token: <Left_CommandSub '$('>
              )
            }
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(mkdir)} {($ VSub_DollarName '$tmp_dir')})
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)})
      ]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [
        (command.SimpleCommand
          words: [{(read)} {(patch_name)} {(level)} {(garbage)}]
          redirects: [(redir.Redir op:<Redir_LessAnd '<&'> fd:16777215 arg_word:{(3)})]
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$patch_name'))}
              arms: [
                (case_arm
                  pat_list: [{(SQ )} {(SQ <'#'>) (Lit_Other '*')}]
                  action: [(command.ControlFlow token:<ControlFlow_Continue continue>)]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$level'))}
              arms: [
                (case_arm pat_list:[{(-p) (Lit_Other '*')}])
                (case_arm
                  pat_list: [{(SQ )} {(SQ <'#'>) (Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:level) op:Equal rhs:(word.EmptyWord))]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (C {(echo)} {(DQ ('unable to parse patch level, ignoring it.'))})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:level) op:Equal rhs:(word.EmptyWord))]
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$garbage'))}
              arms: [
                (case_arm pat_list:[{(SQ )} {(SQ <'#'>) (Lit_Other '*')}])
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ('trailing garbage found in series file: ') ($ VSub_DollarName '$garbage'))
                      }
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {(Lit_Other '[')} {(-f)} 
                              {
                                (DQ ($ VSub_DollarName '$QUILT_PATCHES') (/) 
                                  ($ VSub_DollarName '$patch_name')
                                )
                              } {(Lit_Other ']')}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ($ VSub_DollarName '$patch_name') (" doesn't exist. Skipping."))})
                    (command.ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                )
              ]
            )
            (C {(echo)} {($ VSub_DollarName '$patch_name')})
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.SimpleCommand
                  words: [
                    {(git)}
                    {(mailinfo)}
                    {(DQ ($ VSub_DollarName '$tmp_msg'))}
                    {(DQ ($ VSub_DollarName '$tmp_patch'))}
                  ]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Less '<'>
                      fd: 16777215
                      arg_word: 
                        {
                          (DQ ($ VSub_DollarName '$QUILT_PATCHES') (/) 
                            ($ VSub_DollarName '$patch_name')
                          )
                        }
                    )
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$tmp_info'))}
                    )
                  ]
                )
                (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)})
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} {(-s)} {(DQ ($ VSub_DollarName '$tmp_patch'))})
                (command.BraceGroup
                  children: [
                    (C {(echo)} {(DQ ('Patch is empty.  Was it split wrong?'))})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:GIT_AUTHOR_NAME)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(sed)} {(-ne)} {(SQ <'s/Author: //p'>)} 
                                {(DQ ($ VSub_DollarName '$tmp_info'))}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                      )
                    }
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:GIT_AUTHOR_EMAIL)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(sed)} {(-ne)} {(SQ <'s/Email: //p'>)} 
                                {(DQ ($ VSub_DollarName '$tmp_info'))}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                      )
                    }
                )
              ]
            )
            (C {(export)} {(GIT_AUTHOR_NAME)} {(GIT_AUTHOR_EMAIL)})
            (command.WhileUntil
              keyword: <KW_While while>
              cond: [
                (command.Sentence
                  child: 
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$GIT_AUTHOR_EMAIL'))})
                        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$GIT_AUTHOR_NAME'))})
                      ]
                    )
                  terminator: <Op_Semi ';'>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$quilt_author'))} 
                                  {(Lit_Other ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Sentence
                              child: 
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:GIT_AUTHOR_NAME)
                                      op: Equal
                                      rhs: {(DQ ($ VSub_DollarName '$quilt_author_name'))}
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                            (command.Sentence
                              child: 
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:GIT_AUTHOR_EMAIL)
                                      op: Equal
                                      rhs: {(DQ ($ VSub_DollarName '$quilt_author_email'))}
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                        )
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$dry_run'))} 
                                  {(Lit_Other ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Sentence
                              child: 
                                (command.SimpleCommand
                                  words: [
                                    {(echo)}
                                    {(DQ ('No author found in ') ($ VSub_DollarName '$patch_name'))}
                                  ]
                                  redirects: [
                                    (redir.Redir
                                      op: <Redir_GreatAnd '>&'>
                                      fd: 16777215
                                      arg_word: {(2)}
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                            (command.Sentence
                              child: 
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:GIT_AUTHOR_NAME)
                                      op: Equal
                                      rhs: {(DQ (dry-run-not-found))}
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                            (command.Sentence
                              child: 
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:GIT_AUTHOR_EMAIL)
                                      op: Equal
                                      rhs: {(DQ (dry-run-not-found))}
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                        )
                      ]
                      else_action: [
                        (command.Sentence
                          child: 
                            (command.SimpleCommand
                              words: [
                                {(echo)}
                                {(DQ ('No author found in ') ($ VSub_DollarName '$patch_name'))}
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_GreatAnd '>&'>
                                  fd: 16777215
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          terminator: <Op_Semi ';'>
                        )
                        (C {(echo)} {(DQ (---))})
                        (C {(cat)} {($ VSub_DollarName '$tmp_msg')})
                        (command.Sentence
                          child: (C {(printf)} {(DQ ('Author: '))})
                          terminator: <Op_Semi ';'>
                        )
                        (C {(read)} {(patch_author)})
                        (C {(echo)} {(DQ ($ VSub_DollarName '$patch_author'))})
                        (command.AndOr
                          ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
                          children: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:patch_author_name)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.CommandSubPart
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(expr)} {(DQ (z) ($ VSub_DollarName '$patch_author'))} 
                                                {(Lit_Other ':')} {(SQ <'z\\(.*[^ ]\\) *<.*'>)}
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                      )
                                    }
                                )
                              ]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:patch_author_email)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.CommandSubPart
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(expr)} {(DQ (z) ($ VSub_DollarName '$patch_author'))} 
                                                {(Lit_Other ':')} {(SQ <'.*<\\([^>]*\\)'>)}
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                      )
                                    }
                                )
                              ]
                            )
                            (C {(test)} {(SQ )} {(KW_Bang '!') (Lit_Other '=')} 
                              {(DQ ($ VSub_DollarName '$patch_author_name'))}
                            )
                            (C {(test)} {(SQ )} {(KW_Bang '!') (Lit_Other '=')} 
                              {(DQ ($ VSub_DollarName '$patch_author_email'))}
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:GIT_AUTHOR_NAME)
                                  op: Equal
                                  rhs: {(DQ ($ VSub_DollarName '$patch_author_name'))}
                                )
                              ]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:GIT_AUTHOR_EMAIL)
                                  op: Equal
                                  rhs: {(DQ ($ VSub_DollarName '$patch_author_email'))}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:GIT_AUTHOR_DATE)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(sed)} {(-ne)} {(SQ <'s/Date: //p'>)} 
                                {(DQ ($ VSub_DollarName '$tmp_info'))}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                      )
                    }
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:SUBJECT)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(sed)} {(-ne)} {(SQ <'s/Subject: //p'>)} 
                                {(DQ ($ VSub_DollarName '$tmp_info'))}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                      )
                    }
                )
              ]
            )
            (C {(export)} {(GIT_AUTHOR_DATE)} {(SUBJECT)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_DollarName '$SUBJECT'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:SUBJECT)
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {(echo)} {($ VSub_DollarName '$patch_name')})
                                          (C {(sed)} {(-e)} {(SQ <'s/.patch$//'>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_DollarName '$dry_run'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp Op_DAmp Op_DAmp Op_DPipe]
                      children: [
                        (C {(git)} {(apply)} {(--index)} {(-C1)} 
                          {
                            (word_part.BracedVarSub
                              token: <VSub_Name level>
                              suffix_op: 
                                (suffix_op.StringUnary
                                  op_id: VTest_ColonPlus
                                  arg_word: {(DQ ($ VSub_DollarName '$level'))}
                                )
                            )
                          } {(DQ ($ VSub_DollarName '$tmp_patch'))}
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:tree)
                              op: Equal
                              rhs: 
                                {
                                  (word_part.CommandSubPart
                                    command_list: 
                                      (command.CommandList
                                        children: [(C {(git)} {(write-tree)})]
                                      )
                                    left_token: <Left_CommandSub '$('>
                                  )
                                }
                            )
                          ]
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:commit)
                              op: Equal
                              rhs: 
                                {
                                  (word_part.CommandSubPart
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (command.Pipeline
                                            children: [
                                              (command.Subshell
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (command.Sentence
                                                        child: 
                                                          (C {(echo)} 
                                                            {(DQ ($ VSub_DollarName '$SUBJECT'))}
                                                          )
                                                        terminator: <Op_Semi ';'>
                                                      )
                                                      (command.Sentence
                                                        child: (C {(echo)})
                                                        terminator: <Op_Semi ';'>
                                                      )
                                                      (C {(cat)} {(DQ ($ VSub_DollarName '$tmp_msg'))})
                                                    ]
                                                  )
                                              )
                                              (C {(git)} {(commit-tree)} {($ VSub_DollarName '$tree')} 
                                                {(-p)} {($ VSub_DollarName '$commit')}
                                              )
                                            ]
                                            negated: F
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub '$('>
                                  )
                                }
                            )
                          ]
                        )
                        (C {(git)} {(update-ref)} {(-m)} 
                          {(DQ ('quiltimport: ') ($ VSub_DollarName '$patch_name'))} {(HEAD)} {($ VSub_DollarName '$commit')}
                        )
                        (command.ControlFlow
                          token: <ControlFlow_Exit exit>
                          arg_word: {(4)}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
      redirects: [
        (redir.Redir
          op: <Redir_Less '3<'>
          fd: 3
          arg_word: {(DQ ($ VSub_DollarName '$QUILT_SERIES'))}
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(rm)} {(-rf)} {($ VSub_DollarName '$tmp_dir')})
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(5)})
      ]
    )
  ]
)