(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:functions spids:[32])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [
                      (command.SimpleCommand
                        words: [{(cat)}]
                        redirects: [
                          (redir.HereDoc
                            op: <Redir_DLess '<<'>
                            fd: 16777215
                            here_begin: 
                              {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
                            here_end_span_id: 89
                            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')
                            ]
                          )
                        ]
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [33 90]
              )
            }
          spids: [32]
        )
      ]
      spids: [32]
    )
    (C {(eval)} {(DQ ($ VSub_DollarName '$functions'))})
    (command.FuncDef
      name: finish_ident
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} 
              {
                (DQ ('case ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                  (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (GIT_) ($ VSub_Number '$1') (_NAME) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' in ') 
                  (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (') GIT_') ($ VSub_Number '$1') ('_NAME=') 
                  (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{GIT_') ($ VSub_Number '$1') 
                  ('_EMAIL%%@*}') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && export GIT_') ($ VSub_Number '$1') 
                  ('_NAME;; esac')
                )
              }
            )
            (C {(echo)} {(DQ ('export GIT_') ($ VSub_Number '$1') (_NAME))})
            (C {(echo)} {(DQ ('export GIT_') ($ VSub_Number '$1') (_EMAIL))})
            (C {(echo)} {(DQ ('export GIT_') ($ VSub_Number '$1') (_DATE))})
          ]
          spids: [104]
        )
      spids: [100 103]
    )
    (command.FuncDef
      name: set_ident
      body: 
        (command.BraceGroup
          children: [
            (C {(parse_ident_from_commit)} {(author)} {(AUTHOR)} {(committer)} {(COMMITTER)})
            (C {(finish_ident)} {(AUTHOR)})
            (C {(finish_ident)} {(COMMITTER)})
          ]
          spids: [177]
        )
      spids: [172 176]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:USAGE spids:[203])
          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>...]')
              )
            }
          spids: [203]
        )
      ]
      spids: [203]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:OPTIONS_SPEC spids:[214])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [214]
        )
      ]
      spids: [214]
    )
    (C {(.)} {(git-sh-setup)})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} 
                  {
                    (DQ 
                      (word_part.CommandSubPart
                        command_list: (command.CommandList children:[(C {(is_bare_repository)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [226 228]
                      )
                    )
                  } {(Lit_Other '=')} {(false)} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(require_clean_work_tree)} {(SQ <'rewrite branches'>)})]
          spids: [16777215 238]
        )
      ]
      spids: [16777215 247]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tempdir spids:[250])
          op: Equal
          rhs: {(.git-rewrite)}
          spids: [250]
        )
      ]
      spids: [250]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_env spids:[253])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [253]
        )
      ]
      spids: [253]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_tree spids:[255])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [255]
        )
      ]
      spids: [255]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_index spids:[257])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [257]
        )
      ]
      spids: [257]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_parent spids:[259])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [259]
        )
      ]
      spids: [259]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_msg spids:[261])
          op: Equal
          rhs: {(cat)}
          spids: [261]
        )
      ]
      spids: [261]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_commit spids:[264])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [264]
        )
      ]
      spids: [264]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_tag_name spids:[266])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [266]
        )
      ]
      spids: [266]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_subdir spids:[268])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [268]
        )
      ]
      spids: [268]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:orig_namespace spids:[270])
          op: Equal
          rhs: {(refs/original/)}
          spids: [270]
        )
      ]
      spids: [270]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:force spids:[273])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [273]
        )
      ]
      spids: [273]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:prune_empty spids:[275])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [275]
        )
      ]
      spids: [275]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:remap_to_ancestor spids:[277])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [277]
        )
      ]
      spids: [277]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(Lit_Other ':')})]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(--)}]
                  action: [(C {(shift)}) (command.ControlFlow token:<ControlFlow_Break break>)]
                  spids: [295 296 305 16777215]
                )
                (case_arm
                  pat_list: [{(--force)} {(-f)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:force spids:[317])
                          op: Equal
                          rhs: {(t)}
                          spids: [317]
                        )
                      ]
                      spids: [317]
                    )
                    (command.ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                  spids: [308 311 324 16777215]
                )
                (case_arm
                  pat_list: [{(--remap-to-ancestor)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:remap_to_ancestor spids:[338])
                          op: Equal
                          rhs: {(t)}
                          spids: [338]
                        )
                      ]
                      spids: [338]
                    )
                    (command.ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                  spids: [327 328 345 16777215]
                )
                (case_arm
                  pat_list: [{(--prune-empty)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:prune_empty spids:[355])
                          op: Equal
                          rhs: {(t)}
                          spids: [355]
                        )
                      ]
                      spids: [355]
                    )
                    (command.ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                  spids: [348 349 362 16777215]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other '*')}]
                  spids: [365 367 370 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.Sentence
                      child: (command.ControlFlow token:<ControlFlow_Break break>)
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [373 374 16777215 381]
                )
              ]
              spids: [286 292 381]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:ARG spids:[389])
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$1'))}
                  spids: [389]
                )
              ]
              spids: [389]
            )
            (command.Case
              to_match: {(DQ ($ VSub_Pound '$#'))}
              arms: [(case_arm pat_list:[{(1)}] action:[(C {(usage)})] spids:[403 404 408 16777215])]
              spids: [395 401 410]
            )
            (C {(shift)})
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:OPTARG spids:[416])
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$1'))}
                  spids: [416]
                )
              ]
              spids: [416]
            )
            (C {(shift)})
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$ARG'))}
              arms: [
                (case_arm
                  pat_list: [{(-d)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:tempdir spids:[439])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$OPTARG'))}
                          spids: [439]
                        )
                      ]
                      spids: [439]
                    )
                  ]
                  spids: [435 436 445 16777215]
                )
                (case_arm
                  pat_list: [{(--env-filter)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filter_env spids:[452])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$OPTARG'))}
                          spids: [452]
                        )
                      ]
                      spids: [452]
                    )
                  ]
                  spids: [448 449 458 16777215]
                )
                (case_arm
                  pat_list: [{(--tree-filter)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filter_tree spids:[465])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$OPTARG'))}
                          spids: [465]
                        )
                      ]
                      spids: [465]
                    )
                  ]
                  spids: [461 462 471 16777215]
                )
                (case_arm
                  pat_list: [{(--index-filter)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filter_index spids:[478])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$OPTARG'))}
                          spids: [478]
                        )
                      ]
                      spids: [478]
                    )
                  ]
                  spids: [474 475 484 16777215]
                )
                (case_arm
                  pat_list: [{(--parent-filter)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filter_parent spids:[491])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$OPTARG'))}
                          spids: [491]
                        )
                      ]
                      spids: [491]
                    )
                  ]
                  spids: [487 488 497 16777215]
                )
                (case_arm
                  pat_list: [{(--msg-filter)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filter_msg spids:[504])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$OPTARG'))}
                          spids: [504]
                        )
                      ]
                      spids: [504]
                    )
                  ]
                  spids: [500 501 510 16777215]
                )
                (case_arm
                  pat_list: [{(--commit-filter)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filter_commit spids:[517])
                          op: Equal
                          rhs: 
                            {
                              (DQ ($ VSub_DollarName '$functions') ('; ') ($ VSub_DollarName '$OPTARG'))
                            }
                          spids: [517]
                        )
                      ]
                      spids: [517]
                    )
                  ]
                  spids: [513 514 525 16777215]
                )
                (case_arm
                  pat_list: [{(--tag-name-filter)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filter_tag_name spids:[532])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$OPTARG'))}
                          spids: [532]
                        )
                      ]
                      spids: [532]
                    )
                  ]
                  spids: [528 529 538 16777215]
                )
                (case_arm
                  pat_list: [{(--subdirectory-filter)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:filter_subdir spids:[545])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$OPTARG'))}
                          spids: [545]
                        )
                      ]
                      spids: [545]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:remap_to_ancestor spids:[551])
                          op: Equal
                          rhs: {(t)}
                          spids: [551]
                        )
                      ]
                      spids: [551]
                    )
                  ]
                  spids: [541 542 555 16777215]
                )
                (case_arm
                  pat_list: [{(--original)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:orig_namespace spids:[562])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(expr)} {(DQ ($ VSub_DollarName '$OPTARG') (/))} 
                                        {(Lit_Other ':')} {(SQ <'\\(.*[^/]\\)/*$'>)}
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [563 576]
                              ) (/)
                            }
                          spids: [562]
                        )
                      ]
                      spids: [562]
                    )
                  ]
                  spids: [558 559 580 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [(C {(usage)})]
                  spids: [583 584 590 16777215]
                )
              ]
              spids: [426 432 593]
            )
          ]
          spids: [283 595]
        )
    )
    (command.Case
      to_match: {(DQ ($ VSub_DollarName '$prune_empty') (',') ($ VSub_DollarName '$filter_commit'))}
      arms: [
        (case_arm
          pat_list: [{(Lit_Comma ',')}]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:filter_commit spids:[612])
                  op: Equal
                  rhs: {(SQ <'git commit-tree "$@"'>)}
                  spids: [612]
                )
              ]
              spids: [612]
            )
          ]
          spids: [608 609 616 16777215]
        )
        (case_arm
          pat_list: [{(t) (Lit_Comma ',')}]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:filter_commit spids:[623])
                  op: Equal
                  rhs: 
                    {(DQ ($ VSub_DollarName '$functions') (';')) 
                      (SQ <' git_commit_non_empty_tree "$@"'>)
                    }
                  spids: [623]
                )
              ]
              spids: [623]
            )
          ]
          spids: [618 620 631 16777215]
        )
        (case_arm pat_list:[{(Lit_Comma ',') (Lit_Other '*')}] spids:[633 635 638 16777215])
        (case_arm
          pat_list: [{(Lit_Other '*')}]
          action: [(C {(die)} {(DQ ('Cannot set --prune-empty and --commit-filter at the same time'))})]
          spids: [640 641 16777215 650]
        )
      ]
      spids: [598 606 650]
    )
    (command.Case
      to_match: {(DQ ($ VSub_DollarName '$force'))}
      arms: [
        (case_arm
          pat_list: [{(t)}]
          action: [(C {(rm)} {(-rf)} {(DQ ($ VSub_DollarName '$tempdir'))})]
          spids: [661 662 673 16777215]
        )
        (case_arm
          pat_list: [{(SQ )}]
          action: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-d)} {(DQ ($ VSub_DollarName '$tempdir'))})
                (C {(die)} {(DQ ($ VSub_DollarName '$tempdir') (' already exists, please remove it'))})
              ]
            )
          ]
          spids: [675 677 16777215 698]
        )
      ]
      spids: [653 659 698]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:orig_dir spids:[700])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: (command.CommandList children:[(C {(pwd)})])
                left_token: <Left_CommandSub '$('>
                spids: [701 703]
              )
            }
          spids: [700]
        )
      ]
      spids: [700]
    )
    (command.AndOr
      ops: [Op_DAmp Op_DAmp Op_DAmp Op_DPipe]
      children: [
        (C {(mkdir)} {(-p)} {(DQ ($ VSub_DollarName '$tempdir') (/t))})
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:tempdir spids:[716])
              op: Equal
              rhs: 
                {
                  (DQ 
                    (word_part.CommandSubPart
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Sentence
                              child: (C {(cd)} {(DQ ($ VSub_DollarName '$tempdir'))})
                              terminator: <Op_Semi ';'>
                            )
                            (C {(pwd)})
                          ]
                        )
                      left_token: <Left_CommandSub '$('>
                      spids: [718 727]
                    )
                  )
                }
              spids: [716]
            )
          ]
          spids: [716]
        )
        (C {(cd)} {(DQ ($ VSub_DollarName '$tempdir') (/t))})
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:workdir spids:[741])
              op: Equal
              rhs: 
                {
                  (DQ 
                    (word_part.CommandSubPart
                      command_list: (command.CommandList children:[(C {(pwd)})])
                      left_token: <Left_CommandSub '$('>
                      spids: [743 745]
                    )
                  )
                }
              spids: [741]
            )
          ]
          spids: [741]
        )
        (C {(die)} {(DQ )})
      ]
    )
    (C {(trap)} {(SQ <'cd "$orig_dir"; rm -rf "$tempdir"'>)} {(0)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:ORIG_GIT_DIR spids:[768])
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_DIR'))}
          spids: [768]
        )
      ]
      spids: [768]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:ORIG_GIT_WORK_TREE spids:[773])
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_WORK_TREE'))}
          spids: [773]
        )
      ]
      spids: [773]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:ORIG_GIT_INDEX_FILE spids:[778])
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_INDEX_FILE'))}
          spids: [778]
        )
      ]
      spids: [778]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:GIT_WORK_TREE spids:[783])
          op: Equal
          rhs: {(.)}
          spids: [783]
        )
      ]
      spids: [783]
    )
    (C {(export)} {(GIT_DIR)} {(GIT_WORK_TREE)})
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.SimpleCommand
          words: [{(git)} {(for-each-ref)}]
          redirects: [
            (redir.Redir
              op: <Redir_Great '>'>
              fd: 16777215
              arg_word: {(DQ ($ VSub_DollarName '$tempdir')) (/backup-refs)}
            )
          ]
        )
        (command.ControlFlow token:<ControlFlow_Exit exit>)
      ]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(read)} {(sha1)} {(type)} {(name)})]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$force') (',') ($ VSub_DollarName '$name'))}
              arms: [
                (case_arm
                  pat_list: [{(Lit_Comma ',') ($ VSub_DollarName '$orig_namespace') (Lit_Other '*')}]
                  action: [
                    (C {(die)} 
                      {
                        (DQ ('Cannot create a new backup.\n') ('A previous backup already exists in ') 
                          ($ VSub_DollarName '$orig_namespace') ('\n') ('Force overwriting the backup with -f')
                        )
                      }
                    )
                  ]
                  spids: [835 838 852 16777215]
                )
                (case_arm
                  pat_list: [
                    {(t) (Lit_Comma ',') ($ VSub_DollarName '$orig_namespace') (Lit_Other '*')}
                  ]
                  action: [
                    (C {(git)} {(update-ref)} {(-d)} {(DQ ($ VSub_DollarName '$name'))} 
                      {($ VSub_DollarName '$sha1')}
                    )
                  ]
                  spids: [855 859 875 16777215]
                )
              ]
              spids: [824 832 878]
            )
          ]
          spids: [821 880]
        )
      redirects: [
        (redir.Redir
          op: <Redir_Less '<'>
          fd: 16777215
          arg_word: {(DQ ($ VSub_DollarName '$tempdir')) (/backup-refs)}
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.SimpleCommand
          words: [
            {(git)}
            {(rev-parse)}
            {(--no-flags)}
            {(--revs-only)}
            {(--symbolic-full-name)}
            {(--default)}
            {(HEAD)}
            {(DQ ($ VSub_At '$@'))}
          ]
          redirects: [
            (redir.Redir
              op: <Redir_Great '>'>
              fd: 16777215
              arg_word: {(DQ ($ VSub_DollarName '$tempdir')) (/raw-heads)}
            )
          ]
        )
        (command.ControlFlow token:<ControlFlow_Exit exit>)
      ]
    )
    (command.SimpleCommand
      words: [{(sed)} {(-e)} {(SQ <'/^^/d'>)} {(DQ ($ VSub_DollarName '$tempdir')) (/raw-heads)}]
      redirects: [
        (redir.Redir
          op: <Redir_Great '>'>
          fd: 16777215
          arg_word: {(DQ ($ VSub_DollarName '$tempdir')) (/heads)}
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(test)} {(-s)} {(DQ ($ VSub_DollarName '$tempdir')) (/heads)})
        (C {(die)} {(DQ ('Which ref do you want to rewrite?'))})
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:GIT_INDEX_FILE spids:[963])
          op: Equal
          rhs: 
            {
              (DQ 
                (word_part.CommandSubPart
                  command_list: (command.CommandList children:[(C {(pwd)})])
                  left_token: <Left_CommandSub '$('>
                  spids: [965 967]
                ) (/../index)
              )
            }
          spids: [963]
        )
      ]
      spids: [963]
    )
    (C {(export)} {(GIT_INDEX_FILE)})
    (command.AndOr
      ops: [Op_DPipe]
      children: [(C {(mkdir)} {(../map)}) (C {(die)} {(DQ ('Could not create map/ directory'))})]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:nonrevs spids:[995])
              op: Equal
              rhs: 
                {
                  (word_part.CommandSubPart
                    command_list: 
                      (command.CommandList
                        children: [(C {(git)} {(rev-parse)} {(--no-revs)} {(DQ ($ VSub_At '$@'))})]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [996 1006]
                  )
                }
              spids: [995]
            )
          ]
          spids: [995]
        )
        (command.ControlFlow token:<ControlFlow_Exit exit>)
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$nonrevs'))})]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:dashdash spids:[1025])
                  op: Equal
                  rhs: {(--)}
                  spids: [1025]
                )
              ]
              spids: [1025]
            )
          ]
          spids: [16777215 1022]
        )
      ]
      else_action: [
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:dashdash spids:[1031])
              op: Equal
              rhs: (word.EmptyWord)
              spids: [1031]
            )
          ]
          spids: [1031]
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:remap_to_ancestor spids:[1034])
              op: Equal
              rhs: {(t)}
              spids: [1034]
            )
          ]
          spids: [1034]
        )
      ]
      spids: [1028 1037]
    )
    (command.SimpleCommand
      words: [{(git)} {(rev-parse)} {(--revs-only)} {(DQ ($ VSub_At '$@'))}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(../parse)})]
    )
    (command.Case
      to_match: {(DQ ($ VSub_DollarName '$filter_subdir'))}
      arms: [
        (case_arm
          pat_list: [{(DQ )}]
          action: [
            (C {(eval)} {(set)} {(--)} 
              {
                (DQ 
                  (word_part.CommandSubPart
                    command_list: 
                      (command.CommandList
                        children: [
                          (C {(git)} {(rev-parse)} {(--sq)} {(--no-revs)} {(DQ ($ VSub_At '$@'))})
                        ]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [1074 1086]
                  )
                )
              }
            )
          ]
          spids: [1062 1064 1090 16777215]
        )
        (case_arm
          pat_list: [{(Lit_Other '*')}]
          action: [
            (C {(eval)} {(set)} {(--)} 
              {
                (DQ 
                  (word_part.CommandSubPart
                    command_list: 
                      (command.CommandList
                        children: [
                          (C {(git)} {(rev-parse)} {(--sq)} {(--no-revs)} {(DQ ($ VSub_At '$@'))} 
                            {($ VSub_DollarName '$dashdash')} {(DQ ($ VSub_DollarName '$filter_subdir'))}
                          )
                        ]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [1103 1123]
                  )
                )
              }
            )
          ]
          spids: [1092 1093 1127 16777215]
        )
      ]
      spids: [1054 1060 1129]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.SimpleCommand
          words: [
            {(git)}
            {(rev-list)}
            {(--reverse)}
            {(--topo-order)}
            {(--default)}
            {(HEAD)}
            {(--parents)}
            {(--simplify-merges)}
            {(--stdin)}
            {(DQ ($ VSub_At '$@'))}
          ]
          redirects: [
            (redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(../parse)})
            (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(../revs)})
          ]
        )
        (C {(die)} {(DQ ('Could not get the commits'))})
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:commits spids:[1171])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Pipeline
                        children: [
                          (command.SimpleCommand
                            words: [{(wc)} {(-l)}]
                            redirects: [
                              (redir.Redir
                                op: <Redir_Less '<'>
                                fd: 16777215
                                arg_word: {(../revs)}
                              )
                            ]
                          )
                          (C {(tr)} {(-d)} {(DQ (' '))})
                        ]
                        negated: F
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [1172 1189]
              )
            }
          spids: [1171]
        )
      ]
      spids: [1171]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {($ VSub_DollarName '$commits')} {(-eq)} {(0)})
        (C {(die)} {(DQ ('Found nothing to rewrite'))})
      ]
    )
    (command.FuncDef
      name: report_progress
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$progress'))})
                        (C {(test)} {($ VSub_DollarName '$git_filter_branch__commit_count')} {(-gt)} 
                          {($ VSub_DollarName '$next_sample_at')}
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:count spids:[1245])
                          op: Equal
                          rhs: {($ VSub_DollarName '$git_filter_branch__commit_count')}
                          spids: [1245]
                        )
                      ]
                      spids: [1245]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:now spids:[1250])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [1251 1257]
                              )
                            }
                          spids: [1250]
                        )
                      ]
                      spids: [1250]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:elapsed spids:[1260])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArithSubPart
                                anode: 
                                  (arith_expr.ArithBinary
                                    op_id: Arith_Minus
                                    left: (arith_expr.ArithWord w:{($ VSub_DollarName '$now')})
                                    right: 
                                      (arith_expr.ArithWord
                                        w: {($ VSub_DollarName '$start_timestamp')}
                                      )
                                  )
                                spids: [1261 1268]
                              )
                            }
                          spids: [1260]
                        )
                      ]
                      spids: [1260]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:remaining spids:[1271])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArithSubPart
                                anode: 
                                  (arith_expr.ArithBinary
                                    op_id: Arith_Slash
                                    left: 
                                      (arith_expr.ArithBinary
                                        op_id: Arith_Star
                                        left: 
                                          (arith_expr.ArithBinary
                                            op_id: Arith_Minus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$commits')}
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$count')}
                                              )
                                          )
                                        right: 
                                          (arith_expr.ArithWord
                                            w: {($ VSub_DollarName '$elapsed')}
                                          )
                                      )
                                    right: (arith_expr.ArithWord w:{($ VSub_DollarName '$count')})
                                  )
                                spids: [1272 1291]
                              )
                            }
                          spids: [1271]
                        )
                      ]
                      spids: [1271]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {($ VSub_DollarName '$elapsed')} {(-gt)} {(0)})]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:next_sample_at spids:[1308])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSubPart
                                        anode: 
                                          (arith_expr.ArithBinary
                                            op_id: Arith_Slash
                                            left: 
                                              (arith_expr.ArithBinary
                                                op_id: Arith_Star
                                                left: 
                                                  (arith_expr.ArithBinary
                                                    op_id: Arith_Plus
                                                    left: 
                                                      (arith_expr.ArithWord
                                                        w: {($ VSub_DollarName '$elapsed')}
                                                      )
                                                    right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                                  )
                                                right: 
                                                  (arith_expr.ArithWord
                                                    w: {($ VSub_DollarName '$count')}
                                                  )
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$elapsed')}
                                              )
                                          )
                                        spids: [1309 1328]
                                      )
                                    }
                                  spids: [1308]
                                )
                              ]
                              spids: [1308]
                            )
                          ]
                          spids: [16777215 1305]
                        )
                      ]
                      else_action: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:next_sample_at spids:[1334])
                              op: Equal
                              rhs: 
                                {
                                  (word_part.ArithSubPart
                                    anode: 
                                      (arith_expr.ArithBinary
                                        op_id: Arith_Plus
                                        left: 
                                          (arith_expr.ArithWord
                                            w: {($ VSub_DollarName '$next_sample_at')}
                                          )
                                        right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                      )
                                    spids: [1335 1342]
                                  )
                                }
                              spids: [1334]
                            )
                          ]
                          spids: [1334]
                        )
                      ]
                      spids: [1331 1345]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:progress spids:[1348])
                          op: Equal
                          rhs: 
                            {
                              (DQ (' (') ($ VSub_DollarName '$elapsed') (' seconds passed, remaining ') 
                                ($ VSub_DollarName '$remaining') (' predicted)')
                              )
                            }
                          spids: [1348]
                        )
                      ]
                      spids: [1348]
                    )
                  ]
                  spids: [16777215 1242]
                )
              ]
              spids: [16777215 1358]
            )
            (C {(printf)} 
              {
                (DQ (Lit_Other '\\') ('rRewrite ') ($ VSub_DollarName '$commit') (' (') 
                  ($ VSub_DollarName '$count') (/) ($ VSub_DollarName '$commits') (')') ($ VSub_DollarName '$progress') ('    ')
                )
              }
            )
          ]
          spids: [1217]
        )
      spids: [1212 1216]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:git_filter_branch__commit_count spids:[1379])
          op: Equal
          rhs: {(0)}
          spids: [1379]
        )
      ]
      spids: [1379]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:progress spids:[1383])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [1383]
        )
        (assign_pair
          lhs: (lhs_expr.LhsName name:start_timestamp spids:[1385])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [1385]
        )
      ]
      spids: [1383]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Pipeline
              children: [
                (command.SimpleCommand
                  words: [{(date)} {(SQ <'+%s'>)}]
                  redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                )
                (C {(grep)} {(-q)} {(SQ <'^[0-9][0-9]*$'>)})
              ]
              negated: F
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:next_sample_at spids:[1411])
                  op: Equal
                  rhs: {(0)}
                  spids: [1411]
                )
              ]
              spids: [1411]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:progress spids:[1415])
                  op: Equal
                  rhs: {(DQ ('dummy to ensure this is not empty'))}
                  spids: [1415]
                )
              ]
              spids: [1415]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:start_timestamp spids:[1421])
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: (command.CommandList children:[(C {(date)} {(SQ <'+%s'>)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [1422 1428]
                      )
                    }
                  spids: [1421]
                )
              ]
              spids: [1421]
            )
          ]
          spids: [16777215 1408]
        )
      ]
      spids: [16777215 1430]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Op_DPipe Op_DPipe]
              children: [
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$filter_index'))})
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$filter_tree'))})
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$filter_subdir'))})
              ]
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:need_index spids:[1468])
                  op: Equal
                  rhs: {(t)}
                  spids: [1468]
                )
              ]
              spids: [1468]
            )
          ]
          spids: [16777215 1465]
        )
      ]
      else_action: [
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:need_index spids:[1474])
              op: Equal
              rhs: (word.EmptyWord)
              spids: [1474]
            )
          ]
          spids: [1474]
        )
      ]
      spids: [1471 1476]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(command.Sentence child:(C {(read)} {(commit)} {(parents)}) terminator:<Op_Semi ';'>)]
      body: 
        (command.DoGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:git_filter_branch__commit_count spids:[1491])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Plus
                            left: 
                              (arith_expr.ArithWord
                                w: {($ VSub_DollarName '$git_filter_branch__commit_count')}
                              )
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [1492 1497]
                      )
                    }
                  spids: [1491]
                )
              ]
              spids: [1491]
            )
            (C {(report_progress)})
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.Case
                  to_match: {(DQ ($ VSub_DollarName '$filter_subdir'))}
                  arms: [
                    (case_arm
                      pat_list: [{(DQ )}]
                      action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$need_index'))})]
                              action: [
                                (command.SimpleCommand
                                  words: [
                                    {(git)}
                                    {(read-tree)}
                                    {(-i)}
                                    {(-m)}
                                    {($ VSub_DollarName '$commit')}
                                  ]
                                  more_env: [
                                    (env_pair
                                      name: GIT_ALLOW_NULL_SHA1
                                      val: {(1)}
                                      spids: [1533]
                                    )
                                  ]
                                )
                              ]
                              spids: [16777215 1530]
                            )
                          ]
                          spids: [16777215 1547]
                        )
                      ]
                      spids: [1514 1516 1550 16777215]
                    )
                    (case_arm
                      pat_list: [{(Lit_Other '*')}]
                      action: [
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:err spids:[1561])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.CommandSubPart
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (command.SimpleCommand
                                                words: [
                                                  {(git)}
                                                  {(read-tree)}
                                                  {(-i)}
                                                  {(-m)}
                                                  {($ VSub_DollarName '$commit') (Lit_Other ':') 
                                                    (DQ ($ VSub_DollarName '$filter_subdir'))
                                                  }
                                                ]
                                                redirects: [
                                                  (redir.Redir
                                                    op: <Redir_GreatAnd '2>&'>
                                                    fd: 2
                                                    arg_word: {(1)}
                                                  )
                                                ]
                                                more_env: [
                                                  (env_pair
                                                    name: GIT_ALLOW_NULL_SHA1
                                                    val: {(1)}
                                                    spids: [1563]
                                                  )
                                                ]
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                        spids: [1562 1584]
                                      )
                                    }
                                  spids: [1561]
                                )
                              ]
                              spids: [1561]
                            )
                            (command.BraceGroup
                              children: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Pipeline
                                          children: [
                                            (C {(git)} {(rev-parse)} {(-q)} {(--verify)} 
                                              {($ VSub_DollarName '$commit') (Lit_Other ':') 
                                                (DQ ($ VSub_DollarName '$filter_subdir'))
                                              }
                                            )
                                          ]
                                          negated: T
                                        )
                                      ]
                                      action: [
                                        (C {(rm)} {(-f)} {(DQ ($ VSub_DollarName '$GIT_INDEX_FILE'))})
                                      ]
                                      spids: [16777215 1610]
                                    )
                                  ]
                                  else_action: [
                                    (command.SimpleCommand
                                      words: [{(echo)} {(DQ ($ VSub_DollarName '$err'))}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_GreatAnd '>&'>
                                          fd: 16777215
                                          arg_word: {(2)}
                                        )
                                      ]
                                    )
                                    (C {(false)})
                                  ]
                                  spids: [1622 1638]
                                )
                              ]
                              spids: [1588]
                            )
                          ]
                        )
                      ]
                      spids: [1553 1554 16777215 1644]
                    )
                  ]
                  spids: [1505 1511 1644]
                )
                (C {(die)} {(DQ ('Could not initialize the index'))})
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:GIT_COMMIT spids:[1656])
                  op: Equal
                  rhs: {($ VSub_DollarName '$commit')}
                  spids: [1656]
                )
              ]
              spids: [1656]
            )
            (C {(export)} {(GIT_COMMIT)})
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.SimpleCommand
                  words: [{(git)} {(cat-file)} {(commit)} {(DQ ($ VSub_DollarName '$commit'))}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(../commit)})]
                )
                (C {(die)} {(DQ ('Cannot read commit ') ($ VSub_DollarName '$commit'))})
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(eval)} 
                  {
                    (DQ 
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.SimpleCommand
                                words: [{(set_ident)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Redir_Less '<'>
                                    fd: 16777215
                                    arg_word: {(../commit)}
                                  )
                                ]
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [1693 1698]
                      )
                    )
                  }
                )
                (C {(die)} 
                  {
                    (DQ ('setting author/committer failed for commit ') ($ VSub_DollarName '$commit'))
                  }
                )
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.SimpleCommand
                  words: [{(eval)} {(DQ ($ VSub_DollarName '$filter_env'))}]
                  redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(/dev/null)})]
                )
                (C {(die)} {(DQ ('env filter failed: ') ($ VSub_DollarName '$filter_env'))})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$filter_tree'))} {(Lit_Other ']')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(git)} {(checkout-index)} {(-f)} {(-u)} {(-a)})
                        (C {(die)} {(DQ ('Could not checkout the index'))})
                      ]
                    )
                    (C {(git)} {(clean)} {(-d)} {(-q)} {(-f)} {(-x)})
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (command.SimpleCommand
                          words: [{(eval)} {(DQ ($ VSub_DollarName '$filter_tree'))}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Less '<'>
                              fd: 16777215
                              arg_word: {(/dev/null)}
                            )
                          ]
                        )
                        (C {(die)} {(DQ ('tree filter failed: ') ($ VSub_DollarName '$filter_tree'))})
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (command.Subshell
                          child: 
                            (command.AndOr
                              ops: [Op_DAmp]
                              children: [
                                (C {(git)} {(diff-index)} {(-r)} {(--name-only)} {(--ignore-submodules)} 
                                  {($ VSub_DollarName '$commit')} {(--)}
                                )
                                (C {(git)} {(ls-files)} {(--others)})
                              ]
                            )
                          redirects: [
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(DQ ($ VSub_DollarName '$tempdir')) (/tree-state)}
                            )
                          ]
                          spids: [1811 1838]
                        )
                        (command.ControlFlow token:<ControlFlow_Exit exit>)
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (command.SimpleCommand
                          words: [{(git)} {(update-index)} {(--add)} {(--replace)} {(--remove)} {(--stdin)}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Less '<'>
                              fd: 16777215
                              arg_word: {(DQ ($ VSub_DollarName '$tempdir')) (/tree-state)}
                            )
                          ]
                        )
                        (command.ControlFlow token:<ControlFlow_Exit exit>)
                      ]
                    )
                  ]
                  spids: [16777215 1745]
                )
              ]
              spids: [16777215 1878]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.SimpleCommand
                  words: [{(eval)} {(DQ ($ VSub_DollarName '$filter_index'))}]
                  redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(/dev/null)})]
                )
                (C {(die)} {(DQ ('index filter failed: ') ($ VSub_DollarName '$filter_index'))})
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:parentstr spids:[1904])
                  op: Equal
                  rhs: (word.EmptyWord)
                  spids: [1904]
                )
              ]
              spids: [1904]
            )
            (command.ForEach
              iter_name: parent
              iter_words: [{($ VSub_DollarName '$parents')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ForEach
                      iter_name: reparent
                      iter_words: [
                        {
                          (word_part.CommandSubPart
                            command_list: 
                              (command.CommandList
                                children: [(C {(map)} {(DQ ($ VSub_DollarName '$parent'))})]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [1925 1931]
                          )
                        }
                      ]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (command.Case
                              to_match: {(DQ ($ VSub_DollarName '$parentstr') (' '))}
                              arms: [
                                (case_arm
                                  pat_list: [
                                    {(Lit_Other '*') 
                                      (DQ (' -p ') ($ VSub_DollarName '$reparent') (' ')) (Lit_Other '*')
                                    }
                                  ]
                                  spids: [1947 1954 1957 16777215]
                                )
                                (case_arm
                                  pat_list: [{(Lit_Other '*')}]
                                  action: [
                                    (command.Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:parentstr spids:[1964])
                                          op: Equal
                                          rhs: 
                                            {
                                              (DQ ($ VSub_DollarName '$parentstr') (' -p ') 
                                                ($ VSub_DollarName '$reparent')
                                              )
                                            }
                                          spids: [1964]
                                        )
                                      ]
                                      spids: [1964]
                                    )
                                  ]
                                  spids: [1960 1961 1972 16777215]
                                )
                              ]
                              spids: [1937 1944 1975]
                            )
                          ]
                          spids: [1934 1978]
                        )
                      spids: [1924 1932]
                    )
                  ]
                  spids: [1916 1981]
                )
              spids: [1912 1914]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$filter_parent'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:parentstr spids:[1998])
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Pipeline
                                              children: [
                                                (C {(echo)} {(DQ ($ VSub_DollarName '$parentstr'))})
                                                (C {(eval)} {(DQ ($ VSub_DollarName '$filter_parent'))})
                                              ]
                                              negated: F
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [2000 2014]
                                    )
                                  )
                                }
                              spids: [1998]
                            )
                          ]
                          spids: [1998]
                        )
                        (C {(die)} 
                          {(DQ ('parent filter failed: ') ($ VSub_DollarName '$filter_parent'))}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 1995]
                )
              ]
              spids: [16777215 2028]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.Pipeline
                  children: [
                    (command.BraceGroup
                      children: [
                        (command.WhileUntil
                          keyword: <KW_While while>
                          cond: [
                            (command.AndOr
                              ops: [Op_DAmp]
                              children: [
                                (command.SimpleCommand
                                  words: [{(read)} {(-r)} {(header_line)}]
                                  more_env: [(env_pair name:IFS val:{(SQ )} spids:[2037])]
                                )
                                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$header_line'))})
                              ]
                            )
                          ]
                          body: 
                            (command.DoGroup
                              children: [
                                (command.Sentence
                                  child: (C {(Lit_Other ':')})
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              spids: [2058 2069]
                            )
                        )
                        (C {(cat)})
                      ]
                      redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(../commit)})]
                      spids: [2032]
                    )
                    (command.SimpleCommand
                      words: [{(eval)} {(DQ ($ VSub_DollarName '$filter_msg'))}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(../message)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(die)} {(DQ ('msg filter failed: ') ($ VSub_DollarName '$filter_msg'))})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$need_index'))})]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:tree spids:[2123])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(git)} {(write-tree)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [2124 2128]
                              )
                            }
                          spids: [2123]
                        )
                      ]
                      spids: [2123]
                    )
                  ]
                  spids: [16777215 2120]
                )
              ]
              else_action: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:tree spids:[2134])
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSubPart
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(git)} {(rev-parse)} 
                                    {(DQ ($ VSub_DollarName '$commit') ('^{tree}'))}
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [2135 2144]
                          )
                        }
                      spids: [2134]
                    )
                  ]
                  spids: [2134]
                )
              ]
              spids: [2131 2147]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.SimpleCommand
                  words: [
                    {(Lit_Other '@') (SHELL_PATH) (Lit_Other '@')}
                    {(-c)}
                    {(DQ ($ VSub_DollarName '$filter_commit'))}
                    {(DQ ('git commit-tree'))}
                    {(DQ ($ VSub_DollarName '$tree'))}
                    {($ VSub_DollarName '$parentstr')}
                  ]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Less '<'>
                      fd: 16777215
                      arg_word: {(../message)}
                    )
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(../map/) ($ VSub_DollarName '$commit')}
                    )
                  ]
                  more_env: [
                    (env_pair
                      name: workdir
                      val: {($ VSub_DollarName '$workdir')}
                      spids: [2150]
                    )
                  ]
                )
                (C {(die)} {(DQ ('could not write rewritten commit'))})
              ]
            )
          ]
          spids: [1488 2193]
        )
      redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(../revs)})]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(DQ ($ VSub_DollarName '$remap_to_ancestor'))} {(Lit_Other '=')} {(t)})]
          action: [
            (command.WhileUntil
              keyword: <KW_While while>
              cond: [(C {(read)} {(ref)})]
              body: 
                (command.DoGroup
                  children: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:sha1 spids:[2240])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(rev-parse)} 
                                        {(DQ ($ VSub_DollarName '$ref')) (Lit_Other '^') (0)}
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [2241 2251]
                              )
                            }
                          spids: [2240]
                        )
                      ]
                      spids: [2240]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-f)} 
                          {(DQ ($ VSub_DollarName '$workdir')) (/../map/) ($ VSub_DollarName '$sha1')}
                        )
                        (command.ControlFlow
                          token: <ControlFlow_Continue continue>
                        )
                      ]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:ancestor spids:[2269])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(rev-list)} {(--simplify-merges)} {(-1)} 
                                        {(DQ ($ VSub_DollarName '$ref'))} {(DQ ($ VSub_At '$@'))}
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [2270 2286]
                              )
                            }
                          spids: [2269]
                        )
                      ]
                      spids: [2269]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(DQ ($ VSub_DollarName '$ancestor'))})
                        (command.SimpleCommand
                          words: [
                            {(echo)}
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(map)} {($ VSub_DollarName '$ancestor')})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [2299 2303]
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Redir_DGreat '>>'>
                              fd: 16777215
                              arg_word: 
                                {(DQ ($ VSub_DollarName '$workdir')) (/../map/) 
                                  ($ VSub_DollarName '$sha1')
                                }
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [2237 2314]
                )
              redirects: [
                (redir.Redir
                  op: <Redir_Less '<'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$tempdir')) (/heads)}
                )
              ]
            )
          ]
          spids: [16777215 2227]
        )
      ]
      spids: [16777215 2323]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:_x40 spids:[2330])
          op: Equal
          rhs: {(SQ <'[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'>)}
          spids: [2330]
        )
      ]
      spids: [2330]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:_x40 spids:[2335])
          op: Equal
          rhs: 
            {
              (DQ ($ VSub_DollarName '$_x40') ($ VSub_DollarName '$_x40') ($ VSub_DollarName '$_x40') 
                ($ VSub_DollarName '$_x40') ($ VSub_DollarName '$_x40') ($ VSub_DollarName '$_x40') ($ VSub_DollarName '$_x40') 
                ($ VSub_DollarName '$_x40')
              )
            }
          spids: [2335]
        )
      ]
      spids: [2335]
    )
    (C {(echo)})
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(read)} {(ref)})]
      body: 
        (command.DoGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} 
                  {(DQ ($ VSub_DollarName '$orig_namespace') ($ VSub_DollarName '$ref'))}
                )
                (command.ControlFlow token:<ControlFlow_Continue continue>)
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:sha1 spids:[2377])
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(git)} {(rev-parse)} 
                                {(DQ ($ VSub_DollarName '$ref')) (Lit_Other '^') (0)}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [2378 2388]
                      )
                    }
                  spids: [2377]
                )
              ]
              spids: [2377]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:rewritten spids:[2391])
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [(C {(map)} {($ VSub_DollarName '$sha1')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [2392 2396]
                      )
                    }
                  spids: [2391]
                )
              ]
              spids: [2391]
            )
            (command.AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (C {(test)} {($ VSub_DollarName '$sha1')} {(Lit_Other '=')} 
                  {(DQ ($ VSub_DollarName '$rewritten'))}
                )
                (C {(warn)} {(DQ ("WARNING: Ref '") ($ VSub_DollarName '$ref') ("' is unchanged"))})
                (command.ControlFlow token:<ControlFlow_Continue continue>)
              ]
            )
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$rewritten'))}
              arms: [
                (case_arm
                  pat_list: [{(SQ )}]
                  action: [
                    (C {(echo)} {(DQ ("Ref '") ($ VSub_DollarName '$ref') ("' was deleted"))})
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(git)} {(update-ref)} {(-m)} {(DQ ('filter-branch: delete'))} {(-d)} 
                          {(DQ ($ VSub_DollarName '$ref'))} {($ VSub_DollarName '$sha1')}
                        )
                        (C {(die)} {(DQ ('Could not delete ') ($ VSub_DollarName '$ref'))})
                      ]
                    )
                  ]
                  spids: [2437 2439 2480 16777215]
                )
                (case_arm
                  pat_list: [{($ VSub_DollarName '$_x40')}]
                  action: [
                    (C {(echo)} {(DQ ("Ref '") ($ VSub_DollarName '$ref') ("' was rewritten"))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (command.SimpleCommand
                                      words: [
                                        {(git)}
                                        {(update-ref)}
                                        {(-m)}
                                        {(DQ ('filter-branch: rewrite'))}
                                        {(DQ ($ VSub_DollarName '$ref'))}
                                        {($ VSub_DollarName '$rewritten')}
                                        {($ VSub_DollarName '$sha1')}
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_Great '2>'>
                                          fd: 2
                                          arg_word: {(/dev/null)}
                                        )
                                      ]
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {(test)} 
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (C {(git)} {(cat-file)} {(-t)} 
                                                      {(DQ ($ VSub_DollarName '$ref'))}
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [2531 2541]
                                            )
                                          } {(Lit_Other '=')} {(tag)}
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: [
                                            (command.Sentence
                                              child: 
                                                (C {(test)} {(-z)} 
                                                  {(DQ ($ VSub_DollarName '$filter_tag_name'))}
                                                )
                                              terminator: <Op_Semi ';'>
                                            )
                                          ]
                                          action: [
                                            (C {(warn)} 
                                              {
                                                (DQ 
                                                  (
'WARNING: You said to rewrite tagged commits, but not the corresponding tag.'
                                                  )
                                                )
                                              }
                                            )
                                            (C {(warn)} 
                                              {
                                                (DQ 
                                                  (
"WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag."
                                                  )
                                                )
                                              }
                                            )
                                          ]
                                          spids: [16777215 2562]
                                        )
                                      ]
                                      spids: [16777215 2579]
                                    )
                                  ]
                                  spids: [16777215 2548]
                                )
                              ]
                              else_action: [
                                (C {(die)} {(DQ ('Could not rewrite ') ($ VSub_DollarName '$ref'))})
                              ]
                              spids: [2582 2593]
                            )
                          ]
                          spids: [16777215 2524]
                        )
                      ]
                      spids: [16777215 2596]
                    )
                  ]
                  spids: [2483 2484 2599 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (C {(warn)} 
                      {
                        (DQ ("WARNING: '") ($ VSub_DollarName '$ref') 
                          ("' was rewritten into multiple commits:")
                        )
                      }
                    )
                    (C {(warn)} {(DQ ($ VSub_DollarName '$rewritten'))})
                    (C {(warn)} 
                      {
                        (DQ ("WARNING: Ref '") ($ VSub_DollarName '$ref') 
                          ("' points to the first one now.")
                        )
                      }
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:rewritten spids:[2635])
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {(echo)} {(DQ ($ VSub_DollarName '$rewritten'))})
                                          (C {(head)} {(-n)} {(1)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [2636 2650]
                              )
                            }
                          spids: [2635]
                        )
                      ]
                      spids: [2635]
                    )
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(git)} {(update-ref)} {(-m)} {(DQ ('filter-branch: rewrite to first'))} 
                          {(DQ ($ VSub_DollarName '$ref'))} {($ VSub_DollarName '$rewritten')} {($ VSub_DollarName '$sha1')}
                        )
                        (C {(die)} {(DQ ('Could not rewrite ') ($ VSub_DollarName '$ref'))})
                      ]
                    )
                  ]
                  spids: [2602 2603 2684 16777215]
                )
              ]
              spids: [2428 2434 2687]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(git)} {(update-ref)} {(-m)} {(DQ ('filter-branch: backup'))} 
                  {(DQ ($ VSub_DollarName '$orig_namespace') ($ VSub_DollarName '$ref'))} {($ VSub_DollarName '$sha1')}
                )
                (command.ControlFlow token:<ControlFlow_Exit exit>)
              ]
            )
          ]
          spids: [2355 2712]
        )
      redirects: [
        (redir.Redir
          op: <Redir_Less '<'>
          fd: 16777215
          arg_word: {(DQ ($ VSub_DollarName '$tempdir')) (/heads)}
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$filter_tag_name'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Pipeline
              children: [
                (C {(git)} {(for-each-ref)} 
                  {(--format) (Lit_Other '=') (SQ <'%(objectname) %(objecttype) %(refname)'>)} {(refs/tags)}
                )
                (command.WhileUntil
                  keyword: <KW_While while>
                  cond: [
                    (command.Sentence
                      child: (C {(read)} {(sha1)} {(type)} {(ref)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:ref spids:[2775])
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (word_part.BracedVarSub
                                      token: <VSub_Name ref>
                                      suffix_op: 
                                        (suffix_op.StringUnary
                                          op_id: VOp1_Pound
                                          arg_word: {(refs) (Lit_Slash /) (tags) (Lit_Slash /)}
                                        )
                                      spids: [2777 2784]
                                    )
                                  )
                                }
                              spids: [2775]
                            )
                          ]
                          spids: [2775]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$type'))} 
                                      {(KW_Bang '!') (Lit_Other '=')} {(DQ (commit))} {(-a)} {(DQ ($ VSub_DollarName '$type'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (tag))} 
                                      {(Lit_Other ']')}
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (command.Sentence
                                  child: (command.ControlFlow token:<ControlFlow_Continue continue>)
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              spids: [16777215 2823]
                            )
                          ]
                          spids: [16777215 2830]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$type'))} 
                                      {(Lit_Other '=')} {(DQ (tag))} {(Lit_Other ']')}
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (command.Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:sha1t spids:[2858])
                                      op: Equal
                                      rhs: {(DQ ($ VSub_DollarName '$sha1'))}
                                      spids: [2858]
                                    )
                                  ]
                                  spids: [2858]
                                )
                                (command.AndOr
                                  ops: [Op_DPipe]
                                  children: [
                                    (command.Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:sha1 spids:[2864])
                                          op: Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (word_part.CommandSubPart
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(git)} {(rev-parse)} {(-q)} 
                                                          {(DQ ($ VSub_DollarName '$sha1')) 
                                                            (Lit_Other '^') (Lit_LBrace '{') (commit) (Lit_RBrace '}')
                                                          }
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [2866 2880]
                                                )
                                              )
                                            }
                                          spids: [2864]
                                        )
                                      ]
                                      spids: [2864]
                                    )
                                    (command.ControlFlow
                                      token: <ControlFlow_Continue continue>
                                    )
                                  ]
                                )
                              ]
                              spids: [16777215 2851]
                            )
                          ]
                          spids: [16777215 2888]
                        )
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (C {(Lit_Other '[')} {(-f)} {(DQ (../map/) ($ VSub_DollarName '$sha1'))} 
                              {(Lit_Other ']')}
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Continue continue>
                            )
                          ]
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:new_sha1 spids:[2908])
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(cat)} {(DQ (../map/) ($ VSub_DollarName '$sha1'))})
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [2910 2917]
                                    )
                                  )
                                }
                              spids: [2908]
                            )
                          ]
                          spids: [2908]
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:GIT_COMMIT spids:[2921])
                              op: Equal
                              rhs: {(DQ ($ VSub_DollarName '$sha1'))}
                              spids: [2921]
                            )
                          ]
                          spids: [2921]
                        )
                        (C {(export)} {(GIT_COMMIT)})
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:new_ref spids:[2932])
                                  op: Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (word_part.CommandSubPart
                                          command_list: 
                                            (command.CommandList
                                              children: [
                                                (command.Pipeline
                                                  children: [
                                                    (C {(echo)} {(DQ ($ VSub_DollarName '$ref'))})
                                                    (C {(eval)} 
                                                      {(DQ ($ VSub_DollarName '$filter_tag_name'))}
                                                    )
                                                  ]
                                                  negated: F
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [2934 2948]
                                        )
                                      )
                                    }
                                  spids: [2932]
                                )
                              ]
                              spids: [2932]
                            )
                            (C {(die)} 
                              {
                                (DQ ('tag name filter failed: ') 
                                  ($ VSub_DollarName '$filter_tag_name')
                                )
                              }
                            )
                          ]
                        )
                        (C {(echo)} 
                          {
                            (DQ ($ VSub_DollarName '$ref') (' -> ') ($ VSub_DollarName '$new_ref') 
                              (' (') ($ VSub_DollarName '$sha1') (' -> ') ($ VSub_DollarName '$new_sha1') (')')
                            )
                          }
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$type'))} 
                                      {(Lit_Other '=')} {(DQ (tag))} {(Lit_Other ']')}
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (command.AndOr
                                  ops: [Op_DPipe]
                                  children: [
                                    (command.Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:new_sha1 spids:[2998])
                                          op: Equal
                                          rhs: 
                                            {
                                              (word_part.CommandSubPart
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (command.Pipeline
                                                        children: [
                                                          (command.Subshell
                                                            child: 
                                                              (command.CommandList
                                                                children: [
                                                                  (C {(printf)} 
                                                                    {
                                                                      (SQ 
                                                                        <
'object %s\\ntype commit\\ntag %s\\n'
                                                                        >
                                                                      )
                                                                    } {(DQ ($ VSub_DollarName '$new_sha1'))} {(DQ ($ VSub_DollarName '$new_ref'))}
                                                                  )
                                                                  (command.Pipeline
                                                                    children: [
                                                                      (C {(git)} {(cat-file)} {(tag)} 
                                                                        {
                                                                          (DQ 
                                                                            ($ VSub_DollarName '$ref')
                                                                          )
                                                                        }
                                                                      )
                                                                      (C {(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>)}
                                                                      )
                                                                    ]
                                                                    negated: F
                                                                  )
                                                                ]
                                                              )
                                                            spids: [3001 3065]
                                                          )
                                                          (C {(git)} {(mktag)})
                                                        ]
                                                        negated: F
                                                      )
                                                    ]
                                                  )
                                                left_token: <Left_CommandSub '$('>
                                                spids: [2999 3073]
                                              )
                                            }
                                          spids: [2998]
                                        )
                                      ]
                                      spids: [2998]
                                    )
                                    (C {(die)} 
                                      {
                                        (DQ ('Could not create new tag object for ') 
                                          ($ VSub_DollarName '$ref')
                                        )
                                      }
                                    )
                                  ]
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Pipeline
                                          children: [
                                            (C {(git)} {(cat-file)} {(tag)} 
                                              {(DQ ($ VSub_DollarName '$ref'))}
                                            )
                                            (command.SimpleCommand
                                              words: [
                                                {(sane_grep)}
                                                {(SQ <'^-----BEGIN PGP SIGNATURE-----'>)}
                                              ]
                                              redirects: [
                                                (redir.Redir
                                                  op: <Redir_Great '>'>
                                                  fd: 16777215
                                                  arg_word: {(/dev/null)}
                                                )
                                                (redir.Redir
                                                  op: <Redir_GreatAnd '2>&'>
                                                  fd: 2
                                                  arg_word: {(1)}
                                                )
                                              ]
                                            )
                                          ]
                                          negated: F
                                        )
                                      ]
                                      action: [
                                        (C {(warn)} 
                                          {
                                            (DQ ('gpg signature stripped from tag object ') 
                                              ($ VSub_DollarName '$sha1t')
                                            )
                                          }
                                        )
                                      ]
                                      spids: [16777215 3115]
                                    )
                                  ]
                                  spids: [16777215 3126]
                                )
                              ]
                              spids: [16777215 2995]
                            )
                          ]
                          spids: [16777215 3129]
                        )
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (C {(git)} {(update-ref)} {(DQ (refs/tags/) ($ VSub_DollarName '$new_ref'))} 
                              {(DQ ($ VSub_DollarName '$new_sha1'))}
                            )
                            (C {(die)} {(DQ ('Could not write tag ') ($ VSub_DollarName '$new_ref'))})
                          ]
                        )
                      ]
                      spids: [2772 3157]
                    )
                )
              ]
              negated: F
            )
          ]
          spids: [16777215 2743]
        )
      ]
      spids: [16777215 3159]
    )
    (C {(cd)} {(DQ ($ VSub_DollarName '$orig_dir'))})
    (C {(rm)} {(-rf)} {(DQ ($ VSub_DollarName '$tempdir'))})
    (C {(trap)} {(-)} {(0)})
    (C {(unset)} {(GIT_DIR)} {(GIT_WORK_TREE)} {(GIT_INDEX_FILE)})
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$ORIG_GIT_DIR'))})
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:GIT_DIR spids:[3205])
                      op: Equal
                      rhs: {(DQ ($ VSub_DollarName '$ORIG_GIT_DIR'))}
                      spids: [3205]
                    )
                  ]
                  spids: [3205]
                )
                (C {(export)} {(GIT_DIR)})
              ]
            )
          ]
          spids: [3202]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$ORIG_GIT_WORK_TREE'))})
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:GIT_WORK_TREE spids:[3231])
                      op: Equal
                      rhs: {(DQ ($ VSub_DollarName '$ORIG_GIT_WORK_TREE'))}
                      spids: [3231]
                    )
                  ]
                  spids: [3231]
                )
                (C {(export)} {(GIT_WORK_TREE)})
              ]
            )
          ]
          spids: [3228]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$ORIG_GIT_INDEX_FILE'))})
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:GIT_INDEX_FILE spids:[3258])
                      op: Equal
                      rhs: {(DQ ($ VSub_DollarName '$ORIG_GIT_INDEX_FILE'))}
                      spids: [3258]
                    )
                  ]
                  spids: [3258]
                )
                (C {(export)} {(GIT_INDEX_FILE)})
              ]
            )
          ]
          spids: [3255]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} 
                  {
                    (DQ 
                      (word_part.CommandSubPart
                        command_list: (command.CommandList children:[(C {(is_bare_repository)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [3278 3280]
                      )
                    )
                  } {(Lit_Other '=')} {(false)} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(git)} {(read-tree)} {(-u)} {(-m)} {(HEAD)})
                (command.ControlFlow token:<ControlFlow_Exit exit>)
              ]
            )
          ]
          spids: [16777215 3290]
        )
      ]
      spids: [16777215 3307]
    )
    (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)