(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'functions='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'functions='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'functions='> name:functions)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <cat>
                    more_env: []
                    words: [{<cat>}]
                    redirects: [
                      (Redir
                        op: <Id.Redir_DLess '<<'>
                        loc: (redir_loc.Fd fd:0)
                        arg: 
                          (redir_param.HereDoc
                            here_begin: 
                              {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>}
                            here_end_tok: <Id.Undefined_Tok ''>
                            stdin_parts: [
                              <'warn () {\n'>
                              <'\techo "$*" >&2\n'>
                              <'}\n'>
                              <'\n'>
                              <'map()\n'>
                              <'{\n'>
                              <'\t# if it was not rewritten, take the original\n'>
                              <'\tif test -r "$workdir/../map/$1"\n'>
                              <'\tthen\n'>
                              <'\t\tcat "$workdir/../map/$1"\n'>
                              <'\telse\n'>
                              <'\t\techo "$1"\n'>
                              <'\tfi\n'>
                              <'}\n'>
                              <'\n'>
                              <
'# if you run \'skip_commit "$@"\' in a commit filter, it will print\n'
                              >
                              <'# the (mapped) parents, effectively skipping the commit.\n'>
                              <'\n'>
                              <'skip_commit()\n'>
                              <'{\n'>
                              <'\tshift;\n'>
                              <'\twhile [ -n "$1" ];\n'>
                              <'\tdo\n'>
                              <'\t\tshift;\n'>
                              <'\t\tmap "$1";\n'>
                              <'\t\tshift;\n'>
                              <'\tdone;\n'>
                              <'}\n'>
                              <'\n'>
                              <
'# if you run \'git_commit_non_empty_tree "$@"\' in a commit filter,\n'
                              >
                              <
'# it will skip commits that leave the tree untouched, commit the other.\n'
                              >
                              <'git_commit_non_empty_tree()\n'>
                              <'{\n'>
                              <
'\tif test $# = 3 && test "$1" = $(git rev-parse "$3^{tree}"); then\n'
                              >
                              <'\t\tmap "$3"\n'>
                              <'\telse\n'>
                              <'\t\tgit commit-tree "$@"\n'>
                              <'\tfi\n'>
                              <'}\n'>
                              <
'# override die(): this version puts in an extra line break, so that\n'
                              >
                              <'# the progress is still visible\n'>
                              <'\n'>
                              <'die()\n'>
                              <'{\n'>
                              <'\techo >&2\n'>
                              <'\techo "$*" >&2\n'>
                              <'\texit 1\n'>
                              <'}\n'>
                            ]
                          )
                      )
                    ]
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <eval>
      more_env: []
      words: [{<eval>} {(DQ ($ Id.VSub_DollarName functions))}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <finish_ident>
      name: finish_ident
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'case '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <GIT_> ($ Id.VSub_Number 1) <_NAME> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') 
                    <' in '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\"'>
                      ch: '"'
                    ) <') GIT_'> ($ Id.VSub_Number 1) <'_NAME='> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\"'>
                      ch: '"'
                    ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'{GIT_'> ($ Id.VSub_Number 1) 
                    <'_EMAIL%%@*}'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' && export GIT_'> 
                    ($ Id.VSub_Number 1) <'_NAME;; esac'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'export GIT_'> ($ Id.VSub_Number 1) <_NAME>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'export GIT_'> ($ Id.VSub_Number 1) <_EMAIL>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'export GIT_'> ($ Id.VSub_Number 1) <_DATE>)}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <set_ident>
      name: set_ident
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <parse_ident_from_commit>
              more_env: []
              words: [{<parse_ident_from_commit>} {<author>} {<AUTHOR>} {<committer>} {<COMMITTER>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <finish_ident>
              more_env: []
              words: [{<finish_ident>} {<AUTHOR>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <finish_ident>
              more_env: []
              words: [{<finish_ident>} {<COMMITTER>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'USAGE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'USAGE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'USAGE='> name:USAGE)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'[--env-filter <command>] [--tree-filter <command>]\n'> 
                <'\t[--index-filter <command>] [--parent-filter <command>]\n'> <'\t[--msg-filter <command>] [--commit-filter <command>]\n'> 
                <'\t[--tag-name-filter <command>] [--subdirectory-filter <directory>]\n'> <'\t[--original <namespace>] [-d <directory>] [-f | --force]\n'> <'\t[<rev-list options>...]'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'OPTIONS_SPEC='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'OPTIONS_SPEC='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OPTIONS_SPEC='> name:OPTIONS_SPEC)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<git-sh-setup>}]
      redirects: []
      do_fork: T
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {
                          (DQ 
                            (CommandSub
                              left_token: <Id.Left_DollarParen '$('>
                              child: 
                                (command.Simple
                                  blame_tok: <is_bare_repository>
                                  more_env: []
                                  words: [{<is_bare_repository>}]
                                  redirects: []
                                  do_fork: T
                                )
                              right: <Id.Eof_RParen _>
                            )
                          )
                        }
                        {<Id.Lit_Equals '='>}
                        {<false>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <require_clean_work_tree>
              more_env: []
              words: [{<require_clean_work_tree>} {(SQ <'rewrite branches'>)}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [221 238]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'tempdir='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'tempdir='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tempdir='> name:tempdir)
          op: assign_op.Equal
          rhs: {<.git-rewrite>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'filter_env='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'filter_env='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_env='> name:filter_env)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'filter_tree='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'filter_tree='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_tree='> name:filter_tree)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'filter_index='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'filter_index='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_index='> name:filter_index)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'filter_parent='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'filter_parent='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_parent='> name:filter_parent)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'filter_msg='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'filter_msg='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_msg='> name:filter_msg)
          op: assign_op.Equal
          rhs: {<cat>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'filter_commit='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'filter_commit='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_commit='> name:filter_commit)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'filter_tag_name='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'filter_tag_name='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_tag_name='> name:filter_tag_name)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'filter_subdir='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'filter_subdir='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_subdir='> name:filter_subdir)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'orig_namespace='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'orig_namespace='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'orig_namespace='> name:orig_namespace)
          op: assign_op.Equal
          rhs: {<'refs/original/'>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'force='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'force='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'force='> name:force)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'prune_empty='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'prune_empty='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prune_empty='> name:prune_empty)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'remap_to_ancestor='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'remap_to_ancestor='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'remap_to_ancestor='> name:remap_to_ancestor)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Simple
              blame_tok: <Id.Lit_Colon ':'>
              more_env: []
              words: [{<Id.Lit_Colon ':'>}]
              redirects: []
              do_fork: T
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{(DQ ($ Id.VSub_Number 1))})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <-->
                  pattern: (pat.Words words:[{<-->}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ControlFlow keyword:<Id.ControlFlow_Break break>)
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--force>
                  pattern: (pat.Words words:[{<--force>} {<-f>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'force='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'force='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'force='> name:force)
                          op: assign_op.Equal
                          rhs: {<t>}
                        )
                      ]
                      redirects: []
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Continue continue>
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--remap-to-ancestor>
                  pattern: (pat.Words words:[{<--remap-to-ancestor>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'remap_to_ancestor='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'remap_to_ancestor='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'remap_to_ancestor='>
                              name: remap_to_ancestor
                            )
                          op: assign_op.Equal
                          rhs: {<t>}
                        )
                      ]
                      redirects: []
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Continue continue>
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--prune-empty>
                  pattern: (pat.Words words:[{<--prune-empty>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'prune_empty='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'prune_empty='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'prune_empty='>
                              name: prune_empty
                            )
                          op: assign_op.Equal
                          rhs: {<t>}
                        )
                      ]
                      redirects: []
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Continue continue>
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <->
                  pattern: (pat.Words words:[{<-> <Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: []
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <Id.Lit_Star '*'>
                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Sentence
                      child: (command.ControlFlow keyword:<Id.ControlFlow_Break break>)
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'ARG='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'ARG='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ARG='> name:ARG)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                )
              ]
              redirects: []
            )
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{(DQ ($ Id.VSub_Pound '#'))})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <1>
                  pattern: (pat.Words words:[{<1>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <usage>
                      more_env: []
                      words: [{<usage>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.Simple
              blame_tok: <shift>
              more_env: []
              words: [{<shift>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'OPTARG='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'OPTARG='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OPTARG='> name:OPTARG)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <shift>
              more_env: []
              words: [{<shift>}]
              redirects: []
              do_fork: T
            )
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{(DQ ($ Id.VSub_DollarName ARG))})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <-d>
                  pattern: (pat.Words words:[{<-d>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'tempdir='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'tempdir='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tempdir='> name:tempdir)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--env-filter>
                  pattern: (pat.Words words:[{<--env-filter>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'filter_env='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'filter_env='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_env='> name:filter_env)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--tree-filter>
                  pattern: (pat.Words words:[{<--tree-filter>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'filter_tree='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'filter_tree='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'filter_tree='>
                              name: filter_tree
                            )
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--index-filter>
                  pattern: (pat.Words words:[{<--index-filter>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'filter_index='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'filter_index='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'filter_index='>
                              name: filter_index
                            )
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--parent-filter>
                  pattern: (pat.Words words:[{<--parent-filter>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'filter_parent='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'filter_parent='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'filter_parent='>
                              name: filter_parent
                            )
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--msg-filter>
                  pattern: (pat.Words words:[{<--msg-filter>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'filter_msg='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'filter_msg='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_msg='> name:filter_msg)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--commit-filter>
                  pattern: (pat.Words words:[{<--commit-filter>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'filter_commit='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'filter_commit='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'filter_commit='>
                              name: filter_commit
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName functions) <'; '> ($ Id.VSub_DollarName OPTARG))
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--tag-name-filter>
                  pattern: (pat.Words words:[{<--tag-name-filter>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'filter_tag_name='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'filter_tag_name='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'filter_tag_name='>
                              name: filter_tag_name
                            )
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--subdirectory-filter>
                  pattern: (pat.Words words:[{<--subdirectory-filter>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'filter_subdir='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'filter_subdir='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'filter_subdir='>
                              name: filter_subdir
                            )
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName OPTARG))}
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'remap_to_ancestor='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'remap_to_ancestor='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'remap_to_ancestor='>
                              name: remap_to_ancestor
                            )
                          op: assign_op.Equal
                          rhs: {<t>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <--original>
                  pattern: (pat.Words words:[{<--original>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'orig_namespace='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'orig_namespace='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'orig_namespace='>
                              name: orig_namespace
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <expr>
                                    more_env: []
                                    words: [
                                      {<expr>}
                                      {(DQ ($ Id.VSub_DollarName OPTARG) <'/'>)}
                                      {<Id.Lit_Colon ':'>}
                                      {(SQ <'\\(.*[^/]\\)/*$'>)}
                                    ]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              ) <'/'>
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <Id.Lit_Star '*'>
                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <usage>
                      more_env: []
                      words: [{<usage>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.Case
      case_kw: <Id.KW_Case case>
      to_match: 
        (case_arg.Word
          w: {(DQ ($ Id.VSub_DollarName prune_empty) <','> ($ Id.VSub_DollarName filter_commit))}
        )
      arms_start: <Id.KW_In in>
      arms: [
        (CaseArm
          left: <Id.Lit_Comma ','>
          pattern: (pat.Words words:[{<Id.Lit_Comma ','>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'filter_commit='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'filter_commit='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_commit='> name:filter_commit)
                  op: assign_op.Equal
                  rhs: {(SQ <'git commit-tree "$@"'>)}
                )
              ]
              redirects: []
            )
          ]
          right: <Id.Op_DSemi _>
        )
        (CaseArm
          left: <t>
          pattern: (pat.Words words:[{<t> <Id.Lit_Comma ','>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'filter_commit='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'filter_commit='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'filter_commit='> name:filter_commit)
                  op: assign_op.Equal
                  rhs: 
                    {(DQ ($ Id.VSub_DollarName functions) <';'>) 
                      (SQ <' git_commit_non_empty_tree "$@"'>)
                    }
                )
              ]
              redirects: []
            )
          ]
          right: <Id.Op_DSemi _>
        )
        (CaseArm
          left: <Id.Lit_Comma ','>
          pattern: (pat.Words words:[{<Id.Lit_Comma ','> <Id.Lit_Star '*'>}])
          middle: <Id.Right_CasePat _>
          action: []
          right: <Id.Op_DSemi _>
        )
        (CaseArm
          left: <Id.Lit_Star '*'>
          pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.Simple
              blame_tok: <die>
              more_env: []
              words: [{<die>} {(DQ <'Cannot set --prune-empty and --commit-filter at the same time'>)}]
              redirects: []
              do_fork: T
            )
          ]
        )
      ]
      arms_end: <Id.KW_Esac esac>
      redirects: []
    )
    (command.Case
      case_kw: <Id.KW_Case case>
      to_match: (case_arg.Word w:{(DQ ($ Id.VSub_DollarName force))})
      arms_start: <Id.KW_In in>
      arms: [
        (CaseArm
          left: <t>
          pattern: (pat.Words words:[{<t>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.Simple
              blame_tok: <rm>
              more_env: []
              words: [{<rm>} {<-rf>} {(DQ ($ Id.VSub_DollarName tempdir))}]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.Op_DSemi _>
        )
        (CaseArm
          left: <Id.Left_SingleQuote '\''>
          pattern: (pat.Words words:[{(SQ )}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [{<test>} {<-d>} {(DQ ($ Id.VSub_DollarName tempdir))}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <die>
                  more_env: []
                  words: [
                    {<die>}
                    {(DQ ($ Id.VSub_DollarName tempdir) <' already exists, please remove it'>)}
                  ]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
        )
      ]
      arms_end: <Id.KW_Esac esac>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'orig_dir='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'orig_dir='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'orig_dir='> name:orig_dir)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <pwd>
                    more_env: []
                    words: [{<pwd>}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <mkdir>
          more_env: []
          words: [{<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName tempdir) <'/t'>)}]
          redirects: []
          do_fork: T
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'tempdir='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'tempdir='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tempdir='> name:tempdir)
              op: assign_op.Equal
              rhs: 
                {
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.CommandList
                          children: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <cd>
                                  more_env: []
                                  words: [{<cd>} {(DQ ($ Id.VSub_DollarName tempdir))}]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Simple
                              blame_tok: <pwd>
                              more_env: []
                              words: [{<pwd>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
            )
          ]
          redirects: []
        )
        (command.Simple
          blame_tok: <cd>
          more_env: []
          words: [{<cd>} {(DQ ($ Id.VSub_DollarName tempdir) <'/t'>)}]
          redirects: []
          do_fork: T
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'workdir='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'workdir='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'workdir='> name:workdir)
              op: assign_op.Equal
              rhs: 
                {
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <pwd>
                          more_env: []
                          words: [{<pwd>}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
            )
          ]
          redirects: []
        )
        (command.Simple
          blame_tok: <die>
          more_env: []
          words: [{<die>} {(DQ )}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DPipe _>]
    )
    (command.Simple
      blame_tok: <trap>
      more_env: []
      words: [{<trap>} {(SQ <'cd "$orig_dir"; rm -rf "$tempdir"'>)} {<0>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ORIG_GIT_DIR='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ORIG_GIT_DIR='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ORIG_GIT_DIR='> name:ORIG_GIT_DIR)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName GIT_DIR))}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ORIG_GIT_WORK_TREE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ORIG_GIT_WORK_TREE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ORIG_GIT_WORK_TREE='> name:ORIG_GIT_WORK_TREE)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName GIT_WORK_TREE))}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ORIG_GIT_INDEX_FILE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ORIG_GIT_INDEX_FILE='>
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'ORIG_GIT_INDEX_FILE='>
              name: ORIG_GIT_INDEX_FILE
            )
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName GIT_INDEX_FILE))}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'GIT_WORK_TREE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'GIT_WORK_TREE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'GIT_WORK_TREE='> name:GIT_WORK_TREE)
          op: assign_op.Equal
          rhs: {<.>}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <export>
      more_env: []
      words: [{<export>} {<GIT_DIR>} {<GIT_WORK_TREE>}]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <git>
          more_env: []
          words: [{<git>} {<for-each-ref>}]
          redirects: [
            (Redir
              op: <Id.Redir_Great '>'>
              loc: (redir_loc.Fd fd:1)
              arg: {(DQ ($ Id.VSub_DollarName tempdir)) <'/backup-refs'>}
            )
          ]
          do_fork: T
        )
        (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Simple
              blame_tok: <read>
              more_env: []
              words: [{<read>} {<sha1>} {<type>} {<name>}]
              redirects: []
              do_fork: T
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: 
                (case_arg.Word
                  w: {(DQ ($ Id.VSub_DollarName force) <','> ($ Id.VSub_DollarName name))}
                )
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Lit_Comma ','>
                  pattern: 
                    (pat.Words
                      words: [
                        {<Id.Lit_Comma ','> ($ Id.VSub_DollarName orig_namespace) <Id.Lit_Star '*'>}
                      ]
                    )
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <die>
                      more_env: []
                      words: [
                        {<die>}
                        {
                          (DQ <'Cannot create a new backup.\n'> 
                            <'A previous backup already exists in '> ($ Id.VSub_DollarName orig_namespace) <'\n'> <'Force overwriting the backup with -f'>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <t>
                  pattern: 
                    (pat.Words
                      words: [
                        {<t> <Id.Lit_Comma ','> ($ Id.VSub_DollarName orig_namespace) <Id.Lit_Star '*'>}
                      ]
                    )
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <git>
                      more_env: []
                      words: [
                        {<git>}
                        {<update-ref>}
                        {<-d>}
                        {(DQ ($ Id.VSub_DollarName name))}
                        {($ Id.VSub_DollarName sha1)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: [
        (Redir
          op: <Id.Redir_Less '<'>
          loc: (redir_loc.Fd fd:0)
          arg: {(DQ ($ Id.VSub_DollarName tempdir)) <'/backup-refs'>}
        )
      ]
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <git>
          more_env: []
          words: [
            {<git>}
            {<rev-parse>}
            {<--no-flags>}
            {<--revs-only>}
            {<--symbolic-full-name>}
            {<--default>}
            {<HEAD>}
            {(DQ ($ Id.VSub_At '@'))}
          ]
          redirects: [
            (Redir
              op: <Id.Redir_Great '>'>
              loc: (redir_loc.Fd fd:1)
              arg: {(DQ ($ Id.VSub_DollarName tempdir)) <'/raw-heads'>}
            )
          ]
          do_fork: T
        )
        (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.Simple
      blame_tok: <sed>
      more_env: []
      words: [{<sed>} {<-e>} {(SQ <'/^^/d'>)} {(DQ ($ Id.VSub_DollarName tempdir)) <'/raw-heads'>}]
      redirects: [
        (Redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(DQ ($ Id.VSub_DollarName tempdir)) <'/heads'>}
        )
      ]
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <test>
          more_env: []
          words: [{<test>} {<-s>} {(DQ ($ Id.VSub_DollarName tempdir)) <'/heads'>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <die>
          more_env: []
          words: [{<die>} {(DQ <'Which ref do you want to rewrite?'>)}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'GIT_INDEX_FILE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'GIT_INDEX_FILE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'GIT_INDEX_FILE='> name:GIT_INDEX_FILE)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (CommandSub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.Simple
                      blame_tok: <pwd>
                      more_env: []
                      words: [{<pwd>}]
                      redirects: []
                      do_fork: T
                    )
                  right: <Id.Eof_RParen _>
                ) <'/../index'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <export>
      more_env: []
      words: [{<export>} {<GIT_INDEX_FILE>}]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <mkdir>
          more_env: []
          words: [{<mkdir>} {<'../map'>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <die>
          more_env: []
          words: [{<die>} {(DQ <'Could not create map/ directory'>)}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.AndOr
      children: [
        (command.ShAssignment
          left: <Id.Lit_VarLike 'nonrevs='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'nonrevs='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nonrevs='> name:nonrevs)
              op: assign_op.Equal
              rhs: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <git>
                        more_env: []
                        words: [{<git>} {<rev-parse>} {<--no-revs>} {(DQ ($ Id.VSub_At '@'))}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
            )
          ]
          redirects: []
        )
        (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [{<test>} {<-z>} {(DQ ($ Id.VSub_DollarName nonrevs))}]
                  redirects: []
                  do_fork: T
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'dashdash='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'dashdash='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dashdash='> name:dashdash)
                  op: assign_op.Equal
                  rhs: {<-->}
                )
              ]
              redirects: []
            )
          ]
          spids: [1012 1022]
        )
      ]
      else_kw: <Id.KW_Else else>
      else_action: [
        (command.ShAssignment
          left: <Id.Lit_VarLike 'dashdash='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'dashdash='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dashdash='> name:dashdash)
              op: assign_op.Equal
              rhs: (rhs_word__Empty)
            )
          ]
          redirects: []
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'remap_to_ancestor='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'remap_to_ancestor='>
              lhs: 
                (sh_lhs_expr.Name
                  left: <Id.Lit_VarLike 'remap_to_ancestor='>
                  name: remap_to_ancestor
                )
              op: assign_op.Equal
              rhs: {<t>}
            )
          ]
          redirects: []
        )
      ]
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.Simple
      blame_tok: <git>
      more_env: []
      words: [{<git>} {<rev-parse>} {<--revs-only>} {(DQ ($ Id.VSub_At '@'))}]
      redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'../parse'>})]
      do_fork: T
    )
    (command.Case
      case_kw: <Id.KW_Case case>
      to_match: (case_arg.Word w:{(DQ ($ Id.VSub_DollarName filter_subdir))})
      arms_start: <Id.KW_In in>
      arms: [
        (CaseArm
          left: <Id.Left_DoubleQuote '"'>
          pattern: (pat.Words words:[{(DQ )}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.Simple
              blame_tok: <eval>
              more_env: []
              words: [
                {<eval>}
                {<set>}
                {<-->}
                {
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<rev-parse>} {<--sq>} {<--no-revs>} {(DQ ($ Id.VSub_At '@'))}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.Op_DSemi _>
        )
        (CaseArm
          left: <Id.Lit_Star '*'>
          pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.Simple
              blame_tok: <eval>
              more_env: []
              words: [
                {<eval>}
                {<set>}
                {<-->}
                {
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [
                            {<git>}
                            {<rev-parse>}
                            {<--sq>}
                            {<--no-revs>}
                            {(DQ ($ Id.VSub_At '@'))}
                            {($ Id.VSub_DollarName dashdash)}
                            {(DQ ($ Id.VSub_DollarName filter_subdir))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.Op_DSemi _>
        )
      ]
      arms_end: <Id.KW_Esac esac>
      redirects: []
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <git>
          more_env: []
          words: [
            {<git>}
            {<rev-list>}
            {<--reverse>}
            {<--topo-order>}
            {<--default>}
            {<HEAD>}
            {<--parents>}
            {<--simplify-merges>}
            {<--stdin>}
            {(DQ ($ Id.VSub_At '@'))}
          ]
          redirects: [
            (Redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'../parse'>})
            (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'../revs'>})
          ]
          do_fork: T
        )
        (command.Simple
          blame_tok: <die>
          more_env: []
          words: [{<die>} {(DQ <'Could not get the commits'>)}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'commits='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'commits='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'commits='> name:commits)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Pipeline
                    children: [
                      (command.Simple
                        blame_tok: <wc>
                        more_env: []
                        words: [{<wc>} {<-l>}]
                        redirects: [
                          (Redir
                            op: <Id.Redir_Less '<'>
                            loc: (redir_loc.Fd fd:0)
                            arg: {<'../revs'>}
                          )
                        ]
                        do_fork: T
                      )
                      (command.Simple
                        blame_tok: <tr>
                        more_env: []
                        words: [{<tr>} {<-d>} {(DQ <' '>)}]
                        redirects: []
                        do_fork: T
                      )
                    ]
                    ops: [<Id.Op_Pipe _>]
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <test>
          more_env: []
          words: [{<test>} {($ Id.VSub_DollarName commits)} {<-eq>} {<0>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <die>
          more_env: []
          words: [{<die>} {(DQ <'Found nothing to rewrite'>)}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.ShFunction
      name_tok: <report_progress>
      name: report_progress
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName progress))}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [
                                {<test>}
                                {($ Id.VSub_DollarName git_filter_branch__commit_count)}
                                {<-gt>}
                                {($ Id.VSub_DollarName next_sample_at)}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'count='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'count='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName git_filter_branch__commit_count)}
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'now='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'now='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'now='> name:now)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <date>
                                    more_env: []
                                    words: [{<date>} {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <s>}]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'elapsed='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'elapsed='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'elapsed='> name:elapsed)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                left: <Id.Left_DollarDParen '$(('>
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Minus
                                    left: {($ Id.VSub_DollarName now)}
                                    right: {($ Id.VSub_DollarName start_timestamp)}
                                  )
                                right: <Id.Right_DollarDParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'remaining='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'remaining='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'remaining='> name:remaining)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                left: <Id.Left_DollarDParen '$(('>
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Slash
                                    left: 
                                      (arith_expr.Binary
                                        op_id: Id.Arith_Star
                                        left: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Minus
                                            left: {($ Id.VSub_DollarName commits)}
                                            right: {($ Id.VSub_DollarName count)}
                                          )
                                        right: {($ Id.VSub_DollarName elapsed)}
                                      )
                                    right: {($ Id.VSub_DollarName count)}
                                  )
                                right: <Id.Right_DollarDParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Simple
                                  blame_tok: <test>
                                  more_env: []
                                  words: [{<test>} {($ Id.VSub_DollarName elapsed)} {<-gt>} {<0>}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'next_sample_at='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'next_sample_at='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'next_sample_at='>
                                      name: next_sample_at
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        left: <Id.Left_DollarDParen '$(('>
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Slash
                                            left: 
                                              (arith_expr.Binary
                                                op_id: Id.Arith_Star
                                                left: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Plus
                                                    left: {($ Id.VSub_DollarName elapsed)}
                                                    right: {<Id.Lit_Digits 1>}
                                                  )
                                                right: {($ Id.VSub_DollarName count)}
                                              )
                                            right: {($ Id.VSub_DollarName elapsed)}
                                          )
                                        right: <Id.Right_DollarDParen _>
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [1294 1305]
                        )
                      ]
                      else_kw: <Id.KW_Else else>
                      else_action: [
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'next_sample_at='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'next_sample_at='>
                              lhs: 
                                (sh_lhs_expr.Name
                                  left: <Id.Lit_VarLike 'next_sample_at='>
                                  name: next_sample_at
                                )
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (word_part.ArithSub
                                    left: <Id.Left_DollarDParen '$(('>
                                    anode: 
                                      (arith_expr.Binary
                                        op_id: Id.Arith_Plus
                                        left: {($ Id.VSub_DollarName next_sample_at)}
                                        right: {<Id.Lit_Digits 1>}
                                      )
                                    right: <Id.Right_DollarDParen _>
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                      ]
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'progress='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'progress='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'progress='> name:progress)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ <' ('> ($ Id.VSub_DollarName elapsed) <' seconds passed, remaining '> 
                                ($ Id.VSub_DollarName remaining) <' predicted)'>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1220 1242]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <printf>
              more_env: []
              words: [
                {<printf>}
                {
                  (DQ <Id.Lit_BadBackslash '\\'> <'rRewrite '> ($ Id.VSub_DollarName commit) <' ('> 
                    ($ Id.VSub_DollarName count) <'/'> ($ Id.VSub_DollarName commits) <')'> ($ Id.VSub_DollarName progress) <'    '>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'git_filter_branch__commit_count='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'git_filter_branch__commit_count='>
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'git_filter_branch__commit_count='>
              name: git_filter_branch__commit_count
            )
          op: assign_op.Equal
          rhs: {<0>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'progress='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'progress='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'progress='> name:progress)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
        (AssignPair
          left: <Id.Lit_VarLike 'start_timestamp='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'start_timestamp='> name:start_timestamp)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Pipeline
                  children: [
                    (command.Simple
                      blame_tok: <date>
                      more_env: []
                      words: [{<date>} {(SQ <'+%s'>)}]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Great '2>'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <grep>
                      more_env: []
                      words: [{<grep>} {<-q>} {(SQ <'^[0-9][0-9]*$'>)}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _>]
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'next_sample_at='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'next_sample_at='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'next_sample_at='> name:next_sample_at)
                  op: assign_op.Equal
                  rhs: {<0>}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'progress='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'progress='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'progress='> name:progress)
                  op: assign_op.Equal
                  rhs: {(DQ <'dummy to ensure this is not empty'>)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'start_timestamp='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'start_timestamp='>
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'start_timestamp='>
                      name: start_timestamp
                    )
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <date>
                            more_env: []
                            words: [{<date>} {(SQ <'+%s'>)}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
          ]
          spids: [1387 1408]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.AndOr
                  children: [
                    (command.Simple
                      blame_tok: <test>
                      more_env: []
                      words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName filter_index))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <test>
                      more_env: []
                      words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName filter_tree))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <test>
                      more_env: []
                      words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName filter_subdir))}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_DPipe _> <Id.Op_DPipe _>]
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'need_index='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'need_index='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'need_index='> name:need_index)
                  op: assign_op.Equal
                  rhs: {<t>}
                )
              ]
              redirects: []
            )
          ]
          spids: [1433 1465]
        )
      ]
      else_kw: <Id.KW_Else else>
      else_action: [
        (command.ShAssignment
          left: <Id.Lit_VarLike 'need_index='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'need_index='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'need_index='> name:need_index)
              op: assign_op.Equal
              rhs: (rhs_word__Empty)
            )
          ]
          redirects: []
        )
      ]
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <read>
                  more_env: []
                  words: [{<read>} {<commit>} {<parents>}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'git_filter_branch__commit_count='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'git_filter_branch__commit_count='>
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'git_filter_branch__commit_count='>
                      name: git_filter_branch__commit_count
                    )
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        left: <Id.Left_DollarDParen '$(('>
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: {($ Id.VSub_DollarName git_filter_branch__commit_count)}
                            right: {<Id.Lit_Digits 1>}
                          )
                        right: <Id.Right_DollarDParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <report_progress>
              more_env: []
              words: [{<report_progress>}]
              redirects: []
              do_fork: T
            )
            (command.AndOr
              children: [
                (command.Case
                  case_kw: <Id.KW_Case case>
                  to_match: (case_arg.Word w:{(DQ ($ Id.VSub_DollarName filter_subdir))})
                  arms_start: <Id.KW_In in>
                  arms: [
                    (CaseArm
                      left: <Id.Left_DoubleQuote '"'>
                      pattern: (pat.Words words:[{(DQ )}])
                      middle: <Id.Right_CasePat _>
                      action: [
                        (command.If
                          if_kw: <Id.KW_If if>
                          arms: [
                            (IfArm
                              keyword: <Id.KW_If if>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Simple
                                      blame_tok: <test>
                                      more_env: []
                                      words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName need_index))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                )
                              then_kw: <Id.KW_Then then>
                              action: [
                                (command.Simple
                                  blame_tok: <git>
                                  more_env: [
                                    (EnvPair
                                      left: <Id.Lit_VarLike 'GIT_ALLOW_NULL_SHA1='>
                                      name: GIT_ALLOW_NULL_SHA1
                                      val: {<1>}
                                    )
                                  ]
                                  words: [
                                    {<git>}
                                    {<read-tree>}
                                    {<-i>}
                                    {<-m>}
                                    {($ Id.VSub_DollarName commit)}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              spids: [1519 1530]
                            )
                          ]
                          else_action: []
                          fi_kw: <Id.KW_Fi fi>
                          redirects: []
                        )
                      ]
                      right: <Id.Op_DSemi _>
                    )
                    (CaseArm
                      left: <Id.Lit_Star '*'>
                      pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                      middle: <Id.Right_CasePat _>
                      action: [
                        (command.AndOr
                          children: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'err='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'err='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'err='> name:err)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (CommandSub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (command.Simple
                                            blame_tok: <git>
                                            more_env: [
                                              (EnvPair
                                                left: <Id.Lit_VarLike 'GIT_ALLOW_NULL_SHA1='>
                                                name: GIT_ALLOW_NULL_SHA1
                                                val: {<1>}
                                              )
                                            ]
                                            words: [
                                              {<git>}
                                              {<read-tree>}
                                              {<-i>}
                                              {<-m>}
                                              {($ Id.VSub_DollarName commit) <Id.Lit_Colon ':'> 
                                                (DQ ($ Id.VSub_DollarName filter_subdir))
                                              }
                                            ]
                                            redirects: [
                                              (Redir
                                                op: <Id.Redir_GreatAnd '2>&'>
                                                loc: (redir_loc.Fd fd:2)
                                                arg: {<1>}
                                              )
                                            ]
                                            do_fork: T
                                          )
                                        right: <Id.Eof_RParen _>
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                            (BraceGroup
                              left: <Id.Lit_LBrace '{'>
                              children: [
                                (command.If
                                  if_kw: <Id.KW_If if>
                                  arms: [
                                    (IfArm
                                      keyword: <Id.KW_If if>
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Pipeline
                                              negated: <Id.KW_Bang '!'>
                                              children: [
                                                (command.Simple
                                                  blame_tok: <git>
                                                  more_env: []
                                                  words: [
                                                    {<git>}
                                                    {<rev-parse>}
                                                    {<-q>}
                                                    {<--verify>}
                                                    {($ Id.VSub_DollarName commit) <Id.Lit_Colon ':'> 
                                                      (DQ ($ Id.VSub_DollarName filter_subdir))
                                                    }
                                                  ]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                              ]
                                              ops: []
                                            )
                                          ]
                                        )
                                      then_kw: <Id.KW_Then then>
                                      action: [
                                        (command.Simple
                                          blame_tok: <rm>
                                          more_env: []
                                          words: [
                                            {<rm>}
                                            {<-f>}
                                            {(DQ ($ Id.VSub_DollarName GIT_INDEX_FILE))}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      ]
                                      spids: [1591 1610]
                                    )
                                  ]
                                  else_kw: <Id.KW_Else else>
                                  else_action: [
                                    (command.Simple
                                      blame_tok: <echo>
                                      more_env: []
                                      words: [{<echo>} {(DQ ($ Id.VSub_DollarName err))}]
                                      redirects: [
                                        (Redir
                                          op: <Id.Redir_GreatAnd '>&'>
                                          loc: (redir_loc.Fd fd:1)
                                          arg: {<2>}
                                        )
                                      ]
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <false>
                                      more_env: []
                                      words: [{<false>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  fi_kw: <Id.KW_Fi fi>
                                  redirects: []
                                )
                              ]
                              redirects: []
                              right: <Id.Lit_RBrace '}'>
                            )
                          ]
                          ops: [<Id.Op_DPipe _>]
                        )
                      ]
                    )
                  ]
                  arms_end: <Id.KW_Esac esac>
                  redirects: []
                )
                (command.Simple
                  blame_tok: <die>
                  more_env: []
                  words: [{<die>} {(DQ <'Could not initialize the index'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'GIT_COMMIT='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'GIT_COMMIT='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'GIT_COMMIT='> name:GIT_COMMIT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName commit)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <export>
              more_env: []
              words: [{<export>} {<GIT_COMMIT>}]
              redirects: []
              do_fork: T
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<cat-file>} {<commit>} {(DQ ($ Id.VSub_DollarName commit))}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'../commit'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <die>
                  more_env: []
                  words: [{<die>} {(DQ <'Cannot read commit '> ($ Id.VSub_DollarName commit))}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <eval>
                  more_env: []
                  words: [
                    {<eval>}
                    {
                      (DQ 
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Simple
                              blame_tok: <set_ident>
                              more_env: []
                              words: [{<set_ident>}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_Less '<'>
                                  loc: (redir_loc.Fd fd:0)
                                  arg: {<'../commit'>}
                                )
                              ]
                              do_fork: T
                            )
                          right: <Id.Eof_RParen _>
                        )
                      )
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <die>
                  more_env: []
                  words: [
                    {<die>}
                    {
                      (DQ <'setting author/committer failed for commit '> 
                        ($ Id.VSub_DollarName commit)
                      )
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <eval>
                  more_env: []
                  words: [{<eval>} {(DQ ($ Id.VSub_DollarName filter_env))}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <die>
                  more_env: []
                  words: [{<die>} {(DQ <'env filter failed: '> ($ Id.VSub_DollarName filter_env))}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {(DQ ($ Id.VSub_DollarName filter_tree))}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<checkout-index>} {<-f>} {<-u>} {<-a>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <die>
                          more_env: []
                          words: [{<die>} {(DQ <'Could not checkout the index'>)}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                    (command.Simple
                      blame_tok: <git>
                      more_env: []
                      words: [{<git>} {<clean>} {<-d>} {<-q>} {<-f>} {<-x>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <eval>
                          more_env: []
                          words: [{<eval>} {(DQ ($ Id.VSub_DollarName filter_tree))}]
                          redirects: [
                            (Redir
                              op: <Id.Redir_Less '<'>
                              loc: (redir_loc.Fd fd:0)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <die>
                          more_env: []
                          words: [
                            {<die>}
                            {(DQ <'tree filter failed: '> ($ Id.VSub_DollarName filter_tree))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                    (command.AndOr
                      children: [
                        (command.Subshell
                          left: <Id.Op_LParen _>
                          child: 
                            (command.AndOr
                              children: [
                                (command.Simple
                                  blame_tok: <git>
                                  more_env: []
                                  words: [
                                    {<git>}
                                    {<diff-index>}
                                    {<-r>}
                                    {<--name-only>}
                                    {<--ignore-submodules>}
                                    {($ Id.VSub_DollarName commit)}
                                    {<-->}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <git>
                                  more_env: []
                                  words: [{<git>} {<ls-files>} {<--others>}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              ops: [<Id.Op_DAmp _>]
                            )
                          right: <Id.Right_Subshell _>
                          redirects: [
                            (Redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(DQ ($ Id.VSub_DollarName tempdir)) <'/tree-state'>}
                            )
                          ]
                        )
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Exit exit>
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<update-index>} {<--add>} {<--replace>} {<--remove>} {<--stdin>}]
                          redirects: [
                            (Redir
                              op: <Id.Redir_Less '<'>
                              loc: (redir_loc.Fd fd:0)
                              arg: {(DQ ($ Id.VSub_DollarName tempdir)) <'/tree-state'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Exit exit>
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                  ]
                  spids: [1734 1745]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <eval>
                  more_env: []
                  words: [{<eval>} {(DQ ($ Id.VSub_DollarName filter_index))}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <die>
                  more_env: []
                  words: [{<die>} {(DQ <'index filter failed: '> ($ Id.VSub_DollarName filter_index))}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'parentstr='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'parentstr='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'parentstr='> name:parentstr)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [parent]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName parents)}])
              semi_tok: <Id.Op_Semi _>
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.ForEach
                      keyword: <Id.KW_For for>
                      iter_names: [reparent]
                      iterable: 
                        (for_iter.Words
                          words: [
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <map>
                                    more_env: []
                                    words: [{<map>} {(DQ ($ Id.VSub_DollarName parent))}]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                          ]
                        )
                      semi_tok: <Id.Op_Semi _>
                      body: 
                        (command.DoGroup
                          left: <Id.KW_Do do>
                          children: [
                            (command.Case
                              case_kw: <Id.KW_Case case>
                              to_match: (case_arg.Word w:{(DQ ($ Id.VSub_DollarName parentstr) <' '>)})
                              arms_start: <Id.KW_In in>
                              arms: [
                                (CaseArm
                                  left: <Id.Lit_Star '*'>
                                  pattern: 
                                    (pat.Words
                                      words: [
                                        {<Id.Lit_Star '*'> 
                                          (DQ <' -p '> ($ Id.VSub_DollarName reparent) <' '>) <Id.Lit_Star '*'>
                                        }
                                      ]
                                    )
                                  middle: <Id.Right_CasePat _>
                                  action: []
                                  right: <Id.Op_DSemi _>
                                )
                                (CaseArm
                                  left: <Id.Lit_Star '*'>
                                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                                  middle: <Id.Right_CasePat _>
                                  action: [
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'parentstr='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'parentstr='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'parentstr='>
                                              name: parentstr
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName parentstr) <' -p '> 
                                                ($ Id.VSub_DollarName reparent)
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  right: <Id.Op_DSemi _>
                                )
                              ]
                              arms_end: <Id.KW_Esac esac>
                              redirects: []
                            )
                          ]
                          right: <Id.KW_Done done>
                        )
                      redirects: []
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {(DQ ($ Id.VSub_DollarName filter_parent))}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.AndOr
                      children: [
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'parentstr='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'parentstr='>
                              lhs: 
                                (sh_lhs_expr.Name
                                  left: <Id.Lit_VarLike 'parentstr='>
                                  name: parentstr
                                )
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (command.Simple
                                              blame_tok: <echo>
                                              more_env: []
                                              words: [{<echo>} {(DQ ($ Id.VSub_DollarName parentstr))}]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <eval>
                                              more_env: []
                                              words: [
                                                {<eval>}
                                                {(DQ ($ Id.VSub_DollarName filter_parent))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          ops: [<Id.Op_Pipe _>]
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.Simple
                          blame_tok: <die>
                          more_env: []
                          words: [
                            {<die>}
                            {(DQ <'parent filter failed: '> ($ Id.VSub_DollarName filter_parent))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                  ]
                  spids: [1984 1995]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Pipeline
                  children: [
                    (BraceGroup
                      left: <Id.Lit_LBrace '{'>
                      children: [
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.AndOr
                                  children: [
                                    (command.Simple
                                      blame_tok: <read>
                                      more_env: [(EnvPair left:<Id.Lit_VarLike 'IFS='> name:IFS val:{(SQ )})]
                                      words: [{<read>} {<-r>} {<header_line>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <test>
                                      more_env: []
                                      words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName header_line))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_DAmp _>]
                                )
                              ]
                            )
                          body: 
                            (command.DoGroup
                              left: <Id.KW_Do do>
                              children: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_Colon ':'>
                                      more_env: []
                                      words: [{<Id.Lit_Colon ':'>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              right: <Id.KW_Done done>
                            )
                          redirects: []
                        )
                        (command.Simple
                          blame_tok: <cat>
                          more_env: []
                          words: [{<cat>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {<'../commit'>}
                        )
                      ]
                      right: <Id.Lit_RBrace '}'>
                    )
                    (command.Simple
                      blame_tok: <eval>
                      more_env: []
                      words: [{<eval>} {(DQ ($ Id.VSub_DollarName filter_msg))}]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'../message'>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _>]
                )
                (command.Simple
                  blame_tok: <die>
                  more_env: []
                  words: [{<die>} {(DQ <'msg filter failed: '> ($ Id.VSub_DollarName filter_msg))}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName need_index))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'tree='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'tree='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tree='> name:tree)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <git>
                                    more_env: []
                                    words: [{<git>} {<write-tree>}]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [2109 2120]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'tree='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'tree='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tree='> name:tree)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <git>
                                more_env: []
                                words: [
                                  {<git>}
                                  {<rev-parse>}
                                  {(DQ ($ Id.VSub_DollarName commit) <'^{tree}'>)}
                                ]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <Id.Lit_Splice '@SHELL_PATH'>
                  more_env: [
                    (EnvPair
                      left: <Id.Lit_VarLike 'workdir='>
                      name: workdir
                      val: {($ Id.VSub_DollarName workdir)}
                    )
                  ]
                  words: [
                    {<Id.Lit_Splice '@SHELL_PATH'> <Id.Lit_At '@'>}
                    {<-c>}
                    {(DQ ($ Id.VSub_DollarName filter_commit))}
                    {(DQ <'git commit-tree'>)}
                    {(DQ ($ Id.VSub_DollarName tree))}
                    {($ Id.VSub_DollarName parentstr)}
                  ]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: {<'../message'>}
                    )
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'../map/'> ($ Id.VSub_DollarName commit)}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <die>
                  more_env: []
                  words: [{<die>} {(DQ <'could not write rewritten commit'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: [(Redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'../revs'>})]
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [
                    {<test>}
                    {(DQ ($ Id.VSub_DollarName remap_to_ancestor))}
                    {<Id.Lit_Equals '='>}
                    {<t>}
                  ]
                  redirects: []
                  do_fork: T
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Simple
                      blame_tok: <read>
                      more_env: []
                      words: [{<read>} {<ref>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'sha1='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'sha1='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sha1='> name:sha1)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <git>
                                    more_env: []
                                    words: [
                                      {<git>}
                                      {<rev-parse>}
                                      {(DQ ($ Id.VSub_DollarName ref)) <Id.Lit_Other '^'> <0>}
                                    ]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [
                            {<test>}
                            {<-f>}
                            {(DQ ($ Id.VSub_DollarName workdir)) <'/../map/'> 
                              ($ Id.VSub_DollarName sha1)
                            }
                          ]
                          redirects: []
                          do_fork: T
                        )
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Continue continue>
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'ancestor='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'ancestor='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ancestor='> name:ancestor)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <git>
                                    more_env: []
                                    words: [
                                      {<git>}
                                      {<rev-list>}
                                      {<--simplify-merges>}
                                      {<-1>}
                                      {(DQ ($ Id.VSub_DollarName ref))}
                                      {(DQ ($ Id.VSub_At '@'))}
                                    ]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [{<test>} {(DQ ($ Id.VSub_DollarName ancestor))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [
                            {<echo>}
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <map>
                                    more_env: []
                                    words: [{<map>} {($ Id.VSub_DollarName ancestor)}]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                          ]
                          redirects: [
                            (Redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: 
                                {(DQ ($ Id.VSub_DollarName workdir)) <'/../map/'> 
                                  ($ Id.VSub_DollarName sha1)
                                }
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: [
                (Redir
                  op: <Id.Redir_Less '<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {(DQ ($ Id.VSub_DollarName tempdir)) <'/heads'>}
                )
              ]
            )
          ]
          spids: [2214 2226]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike '_x40='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike '_x40='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_x40='> name:_x40)
          op: assign_op.Equal
          rhs: {(SQ <'[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'>)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike '_x40='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike '_x40='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_x40='> name:_x40)
          op: assign_op.Equal
          rhs: 
            {
              (DQ ($ Id.VSub_DollarName _x40) ($ Id.VSub_DollarName _x40) ($ Id.VSub_DollarName _x40) 
                ($ Id.VSub_DollarName _x40) ($ Id.VSub_DollarName _x40) ($ Id.VSub_DollarName _x40) ($ Id.VSub_DollarName _x40) 
                ($ Id.VSub_DollarName _x40)
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple blame_tok:<echo> more_env:[] words:[{<echo>}] redirects:[] do_fork:T)
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Simple
              blame_tok: <read>
              more_env: []
              words: [{<read>} {<ref>}]
              redirects: []
              do_fork: T
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [
                    {<test>}
                    {<-f>}
                    {(DQ ($ Id.VSub_DollarName orig_namespace) ($ Id.VSub_DollarName ref))}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Continue continue>)
              ]
              ops: [<Id.Op_DAmp _>]
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'sha1='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'sha1='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sha1='> name:sha1)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <git>
                            more_env: []
                            words: [
                              {<git>}
                              {<rev-parse>}
                              {(DQ ($ Id.VSub_DollarName ref)) <Id.Lit_Other '^'> <0>}
                            ]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'rewritten='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'rewritten='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rewritten='> name:rewritten)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <map>
                            more_env: []
                            words: [{<map>} {($ Id.VSub_DollarName sha1)}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [
                    {<test>}
                    {($ Id.VSub_DollarName sha1)}
                    {<Id.Lit_Equals '='>}
                    {(DQ ($ Id.VSub_DollarName rewritten))}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <warn>
                  more_env: []
                  words: [
                    {<warn>}
                    {(DQ <'WARNING: Ref \''> ($ Id.VSub_DollarName ref) <'\' is unchanged'>)}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Continue continue>)
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{(DQ ($ Id.VSub_DollarName rewritten))})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Left_SingleQuote '\''>
                  pattern: (pat.Words words:[{(SQ )}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {(DQ <'Ref \''> ($ Id.VSub_DollarName ref) <'\' was deleted'>)}]
                      redirects: []
                      do_fork: T
                    )
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [
                            {<git>}
                            {<update-ref>}
                            {<-m>}
                            {(DQ <'filter-branch: delete'>)}
                            {<-d>}
                            {(DQ ($ Id.VSub_DollarName ref))}
                            {($ Id.VSub_DollarName sha1)}
                          ]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <die>
                          more_env: []
                          words: [{<die>} {(DQ <'Could not delete '> ($ Id.VSub_DollarName ref))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <Id.VSub_DollarName '$_x40'>
                  pattern: (pat.Words words:[{($ Id.VSub_DollarName _x40)}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {(DQ <'Ref \''> ($ Id.VSub_DollarName ref) <'\' was rewritten'>)}]
                      redirects: []
                      do_fork: T
                    )
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      negated: <Id.KW_Bang '!'>
                                      children: [
                                        (command.Simple
                                          blame_tok: <git>
                                          more_env: []
                                          words: [
                                            {<git>}
                                            {<update-ref>}
                                            {<-m>}
                                            {(DQ <'filter-branch: rewrite'>)}
                                            {(DQ ($ Id.VSub_DollarName ref))}
                                            {($ Id.VSub_DollarName rewritten)}
                                            {($ Id.VSub_DollarName sha1)}
                                          ]
                                          redirects: [
                                            (Redir
                                              op: <Id.Redir_Great '2>'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<'/dev/null'>}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                      ]
                                      ops: []
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.If
                              if_kw: <Id.KW_If if>
                              arms: [
                                (IfArm
                                  keyword: <Id.KW_If if>
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.Simple
                                              blame_tok: <test>
                                              more_env: []
                                              words: [
                                                {<test>}
                                                {
                                                  (CommandSub
                                                    left_token: <Id.Left_DollarParen '$('>
                                                    child: 
                                                      (command.Simple
                                                        blame_tok: <git>
                                                        more_env: []
                                                        words: [
                                                          {<git>}
                                                          {<cat-file>}
                                                          {<-t>}
                                                          {(DQ ($ Id.VSub_DollarName ref))}
                                                        ]
                                                        redirects: []
                                                        do_fork: T
                                                      )
                                                    right: <Id.Eof_RParen _>
                                                  )
                                                }
                                                {<Id.Lit_Equals '='>}
                                                {<tag>}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.If
                                      if_kw: <Id.KW_If if>
                                      arms: [
                                        (IfArm
                                          keyword: <Id.KW_If if>
                                          cond: 
                                            (condition.Shell
                                              commands: [
                                                (command.Sentence
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <test>
                                                      more_env: []
                                                      words: [
                                                        {<test>}
                                                        {<-z>}
                                                        {(DQ ($ Id.VSub_DollarName filter_tag_name))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  terminator: <Id.Op_Semi _>
                                                )
                                              ]
                                            )
                                          then_kw: <Id.KW_Then then>
                                          action: [
                                            (command.Simple
                                              blame_tok: <warn>
                                              more_env: []
                                              words: [
                                                {<warn>}
                                                {
                                                  (DQ 
                                                    <
'WARNING: You said to rewrite tagged commits, but not the corresponding tag.'
                                                    >
                                                  )
                                                }
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <warn>
                                              more_env: []
                                              words: [
                                                {<warn>}
                                                {
                                                  (DQ 
                                                    <
'WARNING: Perhaps use \'--tag-name-filter cat\' to rewrite the tag.'
                                                    >
                                                  )
                                                }
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          spids: [2550 2561]
                                        )
                                      ]
                                      else_action: []
                                      fi_kw: <Id.KW_Fi fi>
                                      redirects: []
                                    )
                                  ]
                                  spids: [2526 2547]
                                )
                              ]
                              else_kw: <Id.KW_Else else>
                              else_action: [
                                (command.Simple
                                  blame_tok: <die>
                                  more_env: []
                                  words: [
                                    {<die>}
                                    {(DQ <'Could not rewrite '> ($ Id.VSub_DollarName ref))}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                          ]
                          spids: [2495 2523]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <Id.Lit_Star '*'>
                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <warn>
                      more_env: []
                      words: [
                        {<warn>}
                        {
                          (DQ <'WARNING: \''> ($ Id.VSub_DollarName ref) 
                            <'\' was rewritten into multiple commits:'>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <warn>
                      more_env: []
                      words: [{<warn>} {(DQ ($ Id.VSub_DollarName rewritten))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <warn>
                      more_env: []
                      words: [
                        {<warn>}
                        {
                          (DQ <'WARNING: Ref \''> ($ Id.VSub_DollarName ref) 
                            <'\' points to the first one now.'>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'rewritten='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'rewritten='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rewritten='> name:rewritten)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        blame_tok: <echo>
                                        more_env: []
                                        words: [{<echo>} {(DQ ($ Id.VSub_DollarName rewritten))}]
                                        redirects: []
                                        do_fork: T
                                      )
                                      (command.Simple
                                        blame_tok: <head>
                                        more_env: []
                                        words: [{<head>} {<-n>} {<1>}]
                                        redirects: []
                                        do_fork: T
                                      )
                                    ]
                                    ops: [<Id.Op_Pipe _>]
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [
                            {<git>}
                            {<update-ref>}
                            {<-m>}
                            {(DQ <'filter-branch: rewrite to first'>)}
                            {(DQ ($ Id.VSub_DollarName ref))}
                            {($ Id.VSub_DollarName rewritten)}
                            {($ Id.VSub_DollarName sha1)}
                          ]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <die>
                          more_env: []
                          words: [{<die>} {(DQ <'Could not rewrite '> ($ Id.VSub_DollarName ref))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [
                    {<git>}
                    {<update-ref>}
                    {<-m>}
                    {(DQ <'filter-branch: backup'>)}
                    {(DQ ($ Id.VSub_DollarName orig_namespace) ($ Id.VSub_DollarName ref))}
                    {($ Id.VSub_DollarName sha1)}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
              ]
              ops: [<Id.Op_DPipe _>]
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: [
        (Redir
          op: <Id.Redir_Less '<'>
          loc: (redir_loc.Fd fd:0)
          arg: {(DQ ($ Id.VSub_DollarName tempdir)) <'/heads'>}
        )
      ]
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {(DQ ($ Id.VSub_DollarName filter_tag_name))}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [
                    {<git>}
                    {<for-each-ref>}
                    {<--format> <Id.Lit_Equals '='> (SQ <'%(objectname) %(objecttype) %(refname)'>)}
                    {<'refs/tags'>}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <read>
                              more_env: []
                              words: [{<read>} {<sha1>} {<type>} {<ref>}]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  body: 
                    (command.DoGroup
                      left: <Id.KW_Do do>
                      children: [
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'ref='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'ref='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (BracedVarSub
                                      left: <Id.Left_DollarBrace '${'>
                                      token: <Id.VSub_Name ref>
                                      var_name: ref
                                      suffix_op: 
                                        (suffix_op.Unary
                                          op: <Id.VOp1_Pound '#'>
                                          arg_word: 
                                            {<refs> <Id.Lit_Slash '/'> <tags> <Id.Lit_Slash '/'>}
                                        )
                                      right: <Id.Right_DollarBrace '}'>
                                    )
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.If
                          if_kw: <Id.KW_If if>
                          arms: [
                            (IfArm
                              keyword: <Id.KW_If if>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.Simple
                                          blame_tok: <Id.Lit_LBracket '['>
                                          more_env: []
                                          words: [
                                            {<Id.Lit_LBracket '['>}
                                            {(DQ ($ Id.VSub_DollarName type))}
                                            {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                                            {(DQ <commit>)}
                                            {<-a>}
                                            {(DQ ($ Id.VSub_DollarName type))}
                                            {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                                            {(DQ <tag>)}
                                            {<Id.Lit_RBracket ']'>}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              then_kw: <Id.KW_Then then>
                              action: [
                                (command.Sentence
                                  child: 
                                    (command.ControlFlow
                                      keyword: <Id.ControlFlow_Continue continue>
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              spids: [2791 2822]
                            )
                          ]
                          else_action: []
                          fi_kw: <Id.KW_Fi fi>
                          redirects: []
                        )
                        (command.If
                          if_kw: <Id.KW_If if>
                          arms: [
                            (IfArm
                              keyword: <Id.KW_If if>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.Simple
                                          blame_tok: <Id.Lit_LBracket '['>
                                          more_env: []
                                          words: [
                                            {<Id.Lit_LBracket '['>}
                                            {(DQ ($ Id.VSub_DollarName type))}
                                            {<Id.Lit_Equals '='>}
                                            {(DQ <tag>)}
                                            {<Id.Lit_RBracket ']'>}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              then_kw: <Id.KW_Then then>
                              action: [
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'sha1t='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'sha1t='>
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'sha1t='>
                                          name: sha1t
                                        )
                                      op: assign_op.Equal
                                      rhs: {(DQ ($ Id.VSub_DollarName sha1))}
                                    )
                                  ]
                                  redirects: []
                                )
                                (command.AndOr
                                  children: [
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'sha1='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'sha1='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'sha1='>
                                              name: sha1
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <git>
                                                      more_env: []
                                                      words: [
                                                        {<git>}
                                                        {<rev-parse>}
                                                        {<-q>}
                                                        {(DQ ($ Id.VSub_DollarName sha1)) 
                                                          <Id.Lit_Other '^'> <Id.Lit_LBrace '{'> <commit> <Id.Lit_RBrace '}'>
                                                        }
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                )
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                    (command.ControlFlow
                                      keyword: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  ops: [<Id.Op_DPipe _>]
                                )
                              ]
                              spids: [2833 2850]
                            )
                          ]
                          else_action: []
                          fi_kw: <Id.KW_Fi fi>
                          redirects: []
                        )
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {<-f>}
                                {(DQ <'../map/'> ($ Id.VSub_DollarName sha1))}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              keyword: <Id.ControlFlow_Continue continue>
                            )
                          ]
                          ops: [<Id.Op_DPipe _>]
                        )
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'new_sha1='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'new_sha1='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'new_sha1='> name:new_sha1)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Simple
                                          blame_tok: <cat>
                                          more_env: []
                                          words: [{<cat>} {(DQ <'../map/'> ($ Id.VSub_DollarName sha1))}]
                                          redirects: []
                                          do_fork: T
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'GIT_COMMIT='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'GIT_COMMIT='>
                              lhs: 
                                (sh_lhs_expr.Name
                                  left: <Id.Lit_VarLike 'GIT_COMMIT='>
                                  name: GIT_COMMIT
                                )
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName sha1))}
                            )
                          ]
                          redirects: []
                        )
                        (command.Simple
                          blame_tok: <export>
                          more_env: []
                          words: [{<export>} {<GIT_COMMIT>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.AndOr
                          children: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'new_ref='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'new_ref='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'new_ref='>
                                      name: new_ref
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Pipeline
                                              children: [
                                                (command.Simple
                                                  blame_tok: <echo>
                                                  more_env: []
                                                  words: [{<echo>} {(DQ ($ Id.VSub_DollarName ref))}]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                                (command.Simple
                                                  blame_tok: <eval>
                                                  more_env: []
                                                  words: [
                                                    {<eval>}
                                                    {(DQ ($ Id.VSub_DollarName filter_tag_name))}
                                                  ]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                              ]
                                              ops: [<Id.Op_Pipe _>]
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <die>
                              more_env: []
                              words: [
                                {<die>}
                                {
                                  (DQ <'tag name filter failed: '> 
                                    ($ Id.VSub_DollarName filter_tag_name)
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_DPipe _>]
                        )
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [
                            {<echo>}
                            {
                              (DQ ($ Id.VSub_DollarName ref) <' -> '> ($ Id.VSub_DollarName new_ref) 
                                <' ('> ($ Id.VSub_DollarName sha1) <' -> '> ($ Id.VSub_DollarName new_sha1) <')'>
                              )
                            }
                          ]
                          redirects: []
                          do_fork: T
                        )
                        (command.If
                          if_kw: <Id.KW_If if>
                          arms: [
                            (IfArm
                              keyword: <Id.KW_If if>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.Simple
                                          blame_tok: <Id.Lit_LBracket '['>
                                          more_env: []
                                          words: [
                                            {<Id.Lit_LBracket '['>}
                                            {(DQ ($ Id.VSub_DollarName type))}
                                            {<Id.Lit_Equals '='>}
                                            {(DQ <tag>)}
                                            {<Id.Lit_RBracket ']'>}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              then_kw: <Id.KW_Then then>
                              action: [
                                (command.AndOr
                                  children: [
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'new_sha1='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'new_sha1='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'new_sha1='>
                                              name: new_sha1
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (CommandSub
                                                left_token: <Id.Left_DollarParen '$('>
                                                child: 
                                                  (command.Pipeline
                                                    children: [
                                                      (command.Subshell
                                                        left: <Id.Op_LParen _>
                                                        child: 
                                                          (command.CommandList
                                                            children: [
                                                              (command.Simple
                                                                blame_tok: <printf>
                                                                more_env: []
                                                                words: [
                                                                  {<printf>}
                                                                  {
                                                                    (SQ 
                                                                      <
'object %s\\ntype commit\\ntag %s\\n'
                                                                      >
                                                                    )
                                                                  }
                                                                  {
                                                                    (DQ 
                                                                      ($ Id.VSub_DollarName new_sha1)
                                                                    )
                                                                  }
                                                                  {
                                                                    (DQ 
                                                                      ($ Id.VSub_DollarName new_ref)
                                                                    )
                                                                  }
                                                                ]
                                                                redirects: []
                                                                do_fork: T
                                                              )
                                                              (command.Pipeline
                                                                children: [
                                                                  (command.Simple
                                                                    blame_tok: <git>
                                                                    more_env: []
                                                                    words: [
                                                                      {<git>}
                                                                      {<cat-file>}
                                                                      {<tag>}
                                                                      {
                                                                        (DQ 
                                                                          ($ Id.VSub_DollarName ref)
                                                                        )
                                                                      }
                                                                    ]
                                                                    redirects: []
                                                                    do_fork: T
                                                                  )
                                                                  (command.Simple
                                                                    blame_tok: <sed>
                                                                    more_env: []
                                                                    words: [
                                                                      {<sed>}
                                                                      {<-n>}
                                                                      {<-e>}
                                                                      {
                                                                        (SQ <'1,/^$/{\n'> 
                                                                          <
'\t\t\t\t\t  /^object /d\n'
                                                                          > <'\t\t\t\t\t  /^type /d\n'> <'\t\t\t\t\t  /^tag /d\n'> <'\t\t\t\t\t}'>
                                                                        )
                                                                      }
                                                                      {<-e>}
                                                                      {
                                                                        (SQ 
                                                                          <
'/^-----BEGIN PGP SIGNATURE-----/q'
                                                                          >
                                                                        )
                                                                      }
                                                                      {<-e>}
                                                                      {(SQ <p>)}
                                                                    ]
                                                                    redirects: []
                                                                    do_fork: T
                                                                  )
                                                                ]
                                                                ops: [<Id.Op_Pipe _>]
                                                              )
                                                            ]
                                                          )
                                                        right: <Id.Right_Subshell _>
                                                        redirects: []
                                                      )
                                                      (command.Simple
                                                        blame_tok: <git>
                                                        more_env: []
                                                        words: [{<git>} {<mktag>}]
                                                        redirects: []
                                                        do_fork: T
                                                      )
                                                    ]
                                                    ops: [<Id.Op_Pipe _>]
                                                  )
                                                right: <Id.Eof_RParen _>
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                    (command.Simple
                                      blame_tok: <die>
                                      more_env: []
                                      words: [
                                        {<die>}
                                        {
                                          (DQ <'Could not create new tag object for '> 
                                            ($ Id.VSub_DollarName ref)
                                          )
                                        }
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_DPipe _>]
                                )
                                (command.If
                                  if_kw: <Id.KW_If if>
                                  arms: [
                                    (IfArm
                                      keyword: <Id.KW_If if>
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Pipeline
                                              children: [
                                                (command.Simple
                                                  blame_tok: <git>
                                                  more_env: []
                                                  words: [
                                                    {<git>}
                                                    {<cat-file>}
                                                    {<tag>}
                                                    {(DQ ($ Id.VSub_DollarName ref))}
                                                  ]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                                (command.Simple
                                                  blame_tok: <sane_grep>
                                                  more_env: []
                                                  words: [
                                                    {<sane_grep>}
                                                    {(SQ <'^-----BEGIN PGP SIGNATURE-----'>)}
                                                  ]
                                                  redirects: [
                                                    (Redir
                                                      op: <Id.Redir_Great '>'>
                                                      loc: (redir_loc.Fd fd:1)
                                                      arg: {<'/dev/null'>}
                                                    )
                                                    (Redir
                                                      op: <Id.Redir_GreatAnd '2>&'>
                                                      loc: (redir_loc.Fd fd:2)
                                                      arg: {<1>}
                                                    )
                                                  ]
                                                  do_fork: T
                                                )
                                              ]
                                              ops: [<Id.Op_Pipe _>]
                                            )
                                          ]
                                        )
                                      then_kw: <Id.KW_Then then>
                                      action: [
                                        (command.Simple
                                          blame_tok: <warn>
                                          more_env: []
                                          words: [
                                            {<warn>}
                                            {
                                              (DQ <'gpg signature stripped from tag object '> 
                                                ($ Id.VSub_DollarName sha1t)
                                              )
                                            }
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      ]
                                      spids: [3085 3114]
                                    )
                                  ]
                                  else_action: []
                                  fi_kw: <Id.KW_Fi fi>
                                  redirects: []
                                )
                              ]
                              spids: [2977 2994]
                            )
                          ]
                          else_action: []
                          fi_kw: <Id.KW_Fi fi>
                          redirects: []
                        )
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <git>
                              more_env: []
                              words: [
                                {<git>}
                                {<update-ref>}
                                {(DQ <'refs/tags/'> ($ Id.VSub_DollarName new_ref))}
                                {(DQ ($ Id.VSub_DollarName new_sha1))}
                              ]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <die>
                              more_env: []
                              words: [
                                {<die>}
                                {(DQ <'Could not write tag '> ($ Id.VSub_DollarName new_ref))}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_DPipe _>]
                        )
                      ]
                      right: <Id.KW_Done done>
                    )
                  redirects: []
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          spids: [2731 2742]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.Simple
      blame_tok: <cd>
      more_env: []
      words: [{<cd>} {(DQ ($ Id.VSub_DollarName orig_dir))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <rm>
      more_env: []
      words: [{<rm>} {<-rf>} {(DQ ($ Id.VSub_DollarName tempdir))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <trap>
      more_env: []
      words: [{<trap>} {<->} {<0>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <unset>
      more_env: []
      words: [{<unset>} {<GIT_DIR>} {<GIT_WORK_TREE>} {<GIT_INDEX_FILE>}]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <test>
          more_env: []
          words: [{<test>} {<-z>} {(DQ ($ Id.VSub_DollarName ORIG_GIT_DIR))}]
          redirects: []
          do_fork: T
        )
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'GIT_DIR='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'GIT_DIR='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'GIT_DIR='> name:GIT_DIR)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName ORIG_GIT_DIR))}
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <export>
                  more_env: []
                  words: [{<export>} {<GIT_DIR>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <test>
          more_env: []
          words: [{<test>} {<-z>} {(DQ ($ Id.VSub_DollarName ORIG_GIT_WORK_TREE))}]
          redirects: []
          do_fork: T
        )
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'GIT_WORK_TREE='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'GIT_WORK_TREE='>
                      lhs: 
                        (sh_lhs_expr.Name
                          left: <Id.Lit_VarLike 'GIT_WORK_TREE='>
                          name: GIT_WORK_TREE
                        )
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName ORIG_GIT_WORK_TREE))}
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <export>
                  more_env: []
                  words: [{<export>} {<GIT_WORK_TREE>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <test>
          more_env: []
          words: [{<test>} {<-z>} {(DQ ($ Id.VSub_DollarName ORIG_GIT_INDEX_FILE))}]
          redirects: []
          do_fork: T
        )
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'GIT_INDEX_FILE='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'GIT_INDEX_FILE='>
                      lhs: 
                        (sh_lhs_expr.Name
                          left: <Id.Lit_VarLike 'GIT_INDEX_FILE='>
                          name: GIT_INDEX_FILE
                        )
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName ORIG_GIT_INDEX_FILE))}
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <export>
                  more_env: []
                  words: [{<export>} {<GIT_INDEX_FILE>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {
                          (DQ 
                            (CommandSub
                              left_token: <Id.Left_DollarParen '$('>
                              child: 
                                (command.Simple
                                  blame_tok: <is_bare_repository>
                                  more_env: []
                                  words: [{<is_bare_repository>}]
                                  redirects: []
                                  do_fork: T
                                )
                              right: <Id.Eof_RParen _>
                            )
                          )
                        }
                        {<Id.Lit_Equals '='>}
                        {<false>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<read-tree>} {<-u>} {<-m>} {<HEAD>}]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
              ]
              ops: [<Id.Op_DPipe _>]
            )
          ]
          spids: [3272 3289]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)