(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:functions) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: {('warn () {\n') ('\techo "$*" >&2\n') ('}\n') ('\n') ('map()\n') ('{\n') ('\t# if it was not rewritten, take the original\n') ('\tif test -r "$workdir/../map/$1"\n') ('\tthen\n') ('\t\tcat "$workdir/../map/$1"\n') ('\telse\n') ('\t\techo "$1"\n') ('\tfi\n') ('}\n') ('\n') ('# if you run \'skip_commit "$@"\' in a commit filter, it will print\n') ('# the (mapped) parents, effectively skipping the commit.\n') ('\n') ('skip_commit()\n') ('{\n') ('\tshift;\n') ('\twhile [ -n "$1" ];\n') ('\tdo\n') ('\t\tshift;\n') ('\t\tmap "$1";\n') ('\t\tshift;\n') ('\tdone;\n') ('}\n') ('\n') ( '# if you run \'git_commit_non_empty_tree "$@"\' in a commit filter,\n' ) ('# it will skip commits that leave the tree untouched, commit the other.\n') ('git_commit_non_empty_tree()\n') ('{\n') ('\tif test $# = 3 && test "$1" = $(git rev-parse "$3^{tree}"); then\n') ('\t\tmap "$3"\n') ('\telse\n') ('\t\tgit commit-tree "$@"\n') ('\tfi\n') ('}\n') ( '# override die(): this version puts in an extra line break, so that\n' ) ('# the progress is still visible\n') ('\n') ('die()\n') ('{\n') ('\techo >&2\n') ('\techo "$*" >&2\n') ('\texit 1\n') ('}\n') } do_expansion: False here_end: EOF was_filled: True spids: [36] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [33 41] ) } spids: [32] ) ] spids: [32] ) (C {(eval)} {(DQ ($ VSub_Name '$functions'))}) (FuncDef name: finish_ident body: (BraceGroup children: [ (C {(echo)} { (DQ ('case ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (GIT_) ($ VSub_Number '$1') (_NAME) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' in ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (') GIT_') ($ VSub_Number '$1') ('_NAME=') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{GIT_') ($ VSub_Number '$1') ('_EMAIL%%@*}') (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: [55] ) spids: [51 54] ) (FuncDef name: set_ident body: (BraceGroup children: [ (C {(parse_ident_from_commit)} {(author)} {(AUTHOR)} {(committer)} {(COMMITTER)}) (C {(finish_ident)} {(AUTHOR)}) (C {(finish_ident)} {(COMMITTER)}) ] spids: [128] ) spids: [123 127] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:USAGE) 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: [154] ) ] spids: [154] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OPTIONS_SPEC) op:Equal rhs:{(SQ )} spids:[165])] spids: [165] ) (C {(.)} {(git-sh-setup)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(is_bare_repository)})]) left_token: <Left_CommandSub '$('> spids: [177 179] ) ) } {(Lit_Other '=')} {(false)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(require_clean_work_tree)} {(SQ <'rewrite branches'>)})] spids: [16777215 189] ) ] spids: [16777215 198] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:tempdir) op:Equal rhs:{(.git-rewrite)} spids:[201])] spids: [201] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter_env) op:Equal rhs:{(SQ )} spids:[204])] spids: [204] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter_tree) op:Equal rhs:{(SQ )} spids:[206])] spids: [206] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter_index) op:Equal rhs:{(SQ )} spids:[208])] spids: [208] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter_parent) op:Equal rhs:{(SQ )} spids:[210])] spids: [210] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter_msg) op:Equal rhs:{(cat)} spids:[212])] spids: [212] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter_commit) op:Equal rhs:{(SQ )} spids:[215])] spids: [215] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter_tag_name) op:Equal rhs:{(SQ )} spids:[217])] spids: [217] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter_subdir) op:Equal rhs:{(SQ )} spids:[219])] spids: [219] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:orig_namespace) op: Equal rhs: {(refs/original/)} spids: [221] ) ] spids: [221] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:force) op:Equal rhs:{(SQ )} spids:[224])] spids: [224] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:prune_empty) op:Equal rhs:{(SQ )} spids:[226])] spids: [226] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:remap_to_ancestor) op:Equal rhs:{(SQ )} spids:[228])] spids: [228] ) (While cond: [(C {(Lit_Other ':')})] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(--)}] action: [(C {(shift)}) (ControlFlow token:<ControlFlow_Break break>)] spids: [246 247 256 16777215] ) (case_arm pat_list: [{(--force)} {(-f)}] action: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:force) op:Equal rhs:{(t)} spids:[268])] spids: [268] ) (ControlFlow token:<ControlFlow_Continue continue>) ] spids: [259 262 275 16777215] ) (case_arm pat_list: [{(--remap-to-ancestor)}] action: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remap_to_ancestor) op: Equal rhs: {(t)} spids: [289] ) ] spids: [289] ) (ControlFlow token:<ControlFlow_Continue continue>) ] spids: [278 279 296 16777215] ) (case_arm pat_list: [{(--prune-empty)}] action: [ (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:prune_empty) op: Equal rhs: {(t)} spids: [306] ) ] spids: [306] ) (ControlFlow token:<ControlFlow_Continue continue>) ] spids: [299 300 313 16777215] ) (case_arm pat_list: [{(-) (Lit_Other '*')}] spids: [316 318 321 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Sentence child: (ControlFlow token:<ControlFlow_Break break>) terminator: <Op_Semi ';'> ) ] spids: [324 325 16777215 332] ) ] spids: [237 243 332] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARG) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [340] ) ] spids: [340] ) (Case to_match: {(DQ ($ VSub_Pound '$#'))} arms: [(case_arm pat_list:[{(1)}] action:[(C {(usage)})] spids:[354 355 359 16777215])] spids: [346 352 361] ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OPTARG) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [367] ) ] spids: [367] ) (C {(shift)}) (Case to_match: {(DQ ($ VSub_Name '$ARG'))} arms: [ (case_arm pat_list: [{(-d)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tempdir) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [390] ) ] spids: [390] ) ] spids: [386 387 396 16777215] ) (case_arm pat_list: [{(--env-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_env) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [403] ) ] spids: [403] ) ] spids: [399 400 409 16777215] ) (case_arm pat_list: [{(--tree-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_tree) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [416] ) ] spids: [416] ) ] spids: [412 413 422 16777215] ) (case_arm pat_list: [{(--index-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_index) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [429] ) ] spids: [429] ) ] spids: [425 426 435 16777215] ) (case_arm pat_list: [{(--parent-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_parent) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [442] ) ] spids: [442] ) ] spids: [438 439 448 16777215] ) (case_arm pat_list: [{(--msg-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_msg) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [455] ) ] spids: [455] ) ] spids: [451 452 461 16777215] ) (case_arm pat_list: [{(--commit-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_commit) op: Equal rhs: {(DQ ($ VSub_Name '$functions') ('; ') ($ VSub_Name '$OPTARG'))} spids: [468] ) ] spids: [468] ) ] spids: [464 465 476 16777215] ) (case_arm pat_list: [{(--tag-name-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_tag_name) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [483] ) ] spids: [483] ) ] spids: [479 480 489 16777215] ) (case_arm pat_list: [{(--subdirectory-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_subdir) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [496] ) ] spids: [496] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remap_to_ancestor) op: Equal rhs: {(t)} spids: [502] ) ] spids: [502] ) ] spids: [492 493 506 16777215] ) (case_arm pat_list: [{(--original)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:orig_namespace) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$OPTARG') (/))} {(Lit_Other ':')} {(SQ <'\\(.*[^/]\\)/*$'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [514 527] ) (/) } spids: [513] ) ] spids: [513] ) ] spids: [509 510 531 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(usage)})] spids: [534 535 541 16777215] ) ] spids: [377 383 544] ) ] spids: [234 546] ) ) (Case to_match: {(DQ ($ VSub_Name '$prune_empty') (',') ($ VSub_Name '$filter_commit'))} arms: [ (case_arm pat_list: [{(Lit_Comma ',')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_commit) op: Equal rhs: {(SQ <'git commit-tree "$@"'>)} spids: [563] ) ] spids: [563] ) ] spids: [559 560 567 16777215] ) (case_arm pat_list: [{(t) (Lit_Comma ',')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_commit) op: Equal rhs: {(DQ ($ VSub_Name '$functions') (';')) (SQ <' git_commit_non_empty_tree "$@"'>)} spids: [574] ) ] spids: [574] ) ] spids: [569 571 582 16777215] ) (case_arm pat_list:[{(Lit_Comma ',') (Lit_Other '*')}] spids:[584 586 589 16777215]) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(die)} {(DQ ('Cannot set --prune-empty and --commit-filter at the same time'))})] spids: [591 592 16777215 601] ) ] spids: [549 557 601] ) (Case to_match: {(DQ ($ VSub_Name '$force'))} arms: [ (case_arm pat_list: [{(t)}] action: [(C {(rm)} {(-rf)} {(DQ ($ VSub_Name '$tempdir'))})] spids: [612 613 624 16777215] ) (case_arm pat_list: [{(SQ )}] action: [ (AndOr children: [ (C {(test)} {(-d)} {(DQ ($ VSub_Name '$tempdir'))}) (C {(die)} {(DQ ($ VSub_Name '$tempdir') (' already exists, please remove it'))}) ] op_id: Op_DAmp ) ] spids: [16777215 628 16777215 649] ) ] spids: [604 610 649] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:orig_dir) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [652 654] ) } spids: [651] ) ] spids: [651] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$tempdir') (/t))}) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tempdir) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Sentence child: (C {(cd)} {(DQ ($ VSub_Name '$tempdir'))}) terminator: <Op_Semi ';'> ) (C {(pwd)}) ] ) left_token: <Left_CommandSub '$('> spids: [669 678] ) ) } spids: [667] ) ] spids: [667] ) (AndOr children: [ (C {(cd)} {(DQ ($ VSub_Name '$tempdir') (/t))}) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:workdir) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [694 696] ) ) } spids: [692] ) ] spids: [692] ) (C {(die)} {(DQ )}) ] op_id: Op_DPipe ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(trap)} {(SQ <'cd "$orig_dir"; rm -rf "$tempdir"'>)} {(0)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ORIG_GIT_DIR) op: Equal rhs: {(DQ ($ VSub_Name '$GIT_DIR'))} spids: [719] ) ] spids: [719] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ORIG_GIT_WORK_TREE) op: Equal rhs: {(DQ ($ VSub_Name '$GIT_WORK_TREE'))} spids: [724] ) ] spids: [724] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ORIG_GIT_INDEX_FILE) op: Equal rhs: {(DQ ($ VSub_Name '$GIT_INDEX_FILE'))} spids: [729] ) ] spids: [729] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:GIT_WORK_TREE) op:Equal rhs:{(.)} spids:[734])] spids: [734] ) (C {(export)} {(GIT_DIR)} {(GIT_WORK_TREE)}) (AndOr children: [ (SimpleCommand words: [{(git)} {(for-each-ref)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tempdir')) (/backup-refs)} spids: [751] ) ] ) (C {(exit)}) ] op_id: Op_DPipe ) (While cond: [(C {(read)} {(sha1)} {(type)} {(name)})] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Name '$force') (',') ($ VSub_Name '$name'))} arms: [ (case_arm pat_list: [{(Lit_Comma ',') ($ VSub_Name '$orig_namespace') (Lit_Other '*')}] action: [ (C {(die)} { (DQ ('Cannot create a new backup.\n') ('A previous backup already exists in ') ($ VSub_Name '$orig_namespace') ('\n') ('Force overwriting the backup with -f') ) } ) ] spids: [786 789 803 16777215] ) (case_arm pat_list: [{(t) (Lit_Comma ',') ($ VSub_Name '$orig_namespace') (Lit_Other '*')}] action: [ (C {(git)} {(update-ref)} {(-d)} {(DQ ($ VSub_Name '$name'))} {($ VSub_Name '$sha1')}) ] spids: [806 810 826 16777215] ) ] spids: [775 783 829] ) ] spids: [772 831] ) redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tempdir')) (/backup-refs)} spids: [833] ) ] ) (AndOr children: [ (SimpleCommand words: [ {(git)} {(rev-parse)} {(--no-flags)} {(--revs-only)} {(--symbolic-full-name)} {(--default)} {(HEAD)} {(DQ ($ VSub_At '$@'))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tempdir')) (/raw-heads)} spids: [864] ) ] ) (C {(exit)}) ] op_id: Op_DPipe ) (SimpleCommand words: [{(sed)} {(-e)} {(SQ <'/^^/d'>)} {(DQ ($ VSub_Name '$tempdir')) (/raw-heads)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tempdir')) (/heads)} spids: [888] ) ] ) (AndOr children: [ (C {(test)} {(-s)} {(DQ ($ VSub_Name '$tempdir')) (/heads)}) (C {(die)} {(DQ ('Which ref do you want to rewrite?'))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_INDEX_FILE) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [916 918] ) (/../index) ) } spids: [914] ) ] spids: [914] ) (C {(export)} {(GIT_INDEX_FILE)}) (AndOr children: [(C {(mkdir)} {(../map)}) (C {(die)} {(DQ ('Could not create map/ directory'))})] op_id: Op_DPipe ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nonrevs) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(rev-parse)} {(--no-revs)} {(DQ ($ VSub_At '$@'))})] ) left_token: <Left_CommandSub '$('> spids: [947 957] ) } spids: [946] ) ] spids: [946] ) (C {(exit)}) ] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$nonrevs'))})] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:dashdash) op:Equal rhs:{(--)} spids:[976])] spids: [976] ) ] spids: [16777215 973] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:dashdash) op:Equal rhs:{(SQ )} spids:[982])] spids: [982] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:remap_to_ancestor) op:Equal rhs:{(t)} spids:[985])] spids: [985] ) ] spids: [979 988] ) (SimpleCommand words: [{(git)} {(rev-parse)} {(--revs-only)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(../parse)} spids:[1001])] ) (Case to_match: {(DQ ($ VSub_Name '$filter_subdir'))} arms: [ (case_arm pat_list: [{(DQ )}] action: [ (C {(eval)} {(set)} {(--)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-parse)} {(--sq)} {(--no-revs)} {(DQ ($ VSub_At '$@'))}) ] ) left_token: <Left_CommandSub '$('> spids: [1025 1037] ) ) } ) ] spids: [16777215 1015 1041 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(eval)} {(set)} {(--)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-parse)} {(--sq)} {(--no-revs)} {(DQ ($ VSub_At '$@'))} {($ VSub_Name '$dashdash')} {(DQ ($ VSub_Name '$filter_subdir'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [1054 1074] ) ) } ) ] spids: [1043 1044 1078 16777215] ) ] spids: [1005 1011 1080] ) (AndOr children: [ (SimpleCommand words: [ {(git)} {(rev-list)} {(--reverse)} {(--topo-order)} {(--default)} {(HEAD)} {(--parents)} {(--simplify-merges)} {(--stdin)} {(DQ ($ VSub_At '$@'))} ] redirects: [ (Redir op_id:Redir_Less fd:16777215 arg_word:{(../parse)} spids:[1107]) (Redir op_id:Redir_Great fd:16777215 arg_word:{(../revs)} spids:[1110]) ] ) (C {(die)} {(DQ ('Could not get the commits'))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:commits) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [{(wc)} {(-l)}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(../revs)} spids: [1128] ) ] ) (C {(tr)} {(-d)} {(DQ (' '))}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [1123 1140] ) } spids: [1122] ) ] spids: [1122] ) (AndOr children: [ (C {(test)} {($ VSub_Name '$commits')} {(-eq)} {(0)}) (C {(die)} {(DQ ('Found nothing to rewrite'))}) ] op_id: Op_DAmp ) (FuncDef name: report_progress body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (AndOr children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$progress'))}) (C {(test)} {($ VSub_Name '$git_filter_branch__commit_count')} {(-gt)} {($ VSub_Name '$next_sample_at')} ) ] op_id: Op_DAmp ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:count) op: Equal rhs: {($ VSub_Name '$git_filter_branch__commit_count')} spids: [1196] ) ] spids: [1196] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:now) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)})] ) left_token: <Left_CommandSub '$('> spids: [1202 1208] ) } spids: [1201] ) ] spids: [1201] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:elapsed) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$now')}) right: (ArithWord w:{($ VSub_Name '$start_timestamp')}) ) spids: [1212 1219] ) } spids: [1211] ) ] spids: [1211] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remaining) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Slash left: (ArithBinary op_id: Arith_Star left: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$commits')}) right: (ArithWord w:{($ VSub_Name '$count')}) ) right: (ArithWord w:{($ VSub_Name '$elapsed')}) ) right: (ArithWord w:{($ VSub_Name '$count')}) ) spids: [1223 1242] ) } spids: [1222] ) ] spids: [1222] ) (If arms: [ (if_arm cond: [(C {(test)} {($ VSub_Name '$elapsed')} {(-gt)} {(0)})] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:next_sample_at) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Slash left: (ArithBinary op_id: Arith_Star left: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{($ VSub_Name '$elapsed')}) right: (ArithWord w:{(Lit_Digits 1)}) ) right: (ArithWord w:{($ VSub_Name '$count')}) ) right: (ArithWord w:{($ VSub_Name '$elapsed')}) ) spids: [1260 1279] ) } spids: [1259] ) ] spids: [1259] ) ] spids: [16777215 1256] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:next_sample_at) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{($ VSub_Name '$next_sample_at')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [1286 1293] ) } spids: [1285] ) ] spids: [1285] ) ] spids: [1282 1296] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:progress) op: Equal rhs: { (DQ (' (') ($ VSub_Name '$elapsed') (' seconds passed, remaining ') ($ VSub_Name '$remaining') (' predicted)') ) } spids: [1299] ) ] spids: [1299] ) ] spids: [16777215 1193] ) ] spids: [16777215 1309] ) (C {(printf)} { (DQ (Lit_Other '\\') ('rRewrite ') ($ VSub_Name '$commit') (' (') ($ VSub_Name '$count') (/) ($ VSub_Name '$commits') (')') ($ VSub_Name '$progress') (' ') ) } ) ] spids: [1168] ) spids: [1163 1167] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:git_filter_branch__commit_count) op: Equal rhs: {(0)} spids: [1330] ) ] spids: [1330] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs:(LhsName name:progress) op:Equal rhs:{(SQ )} spids:[1334]) (assign_pair lhs:(LhsName name:start_timestamp) op:Equal rhs:{(SQ )} spids:[1336]) ] spids: [1334] ) (If arms: [ (if_arm cond: [ (Pipeline children: [ (SimpleCommand words: [{(date)} {(SQ <'+%s'>)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1346])] ) (C {(grep)} {(-q)} {(SQ <'^[0-9][0-9]*$'>)}) ] negated: False ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:next_sample_at) op:Equal rhs:{(0)} spids:[1362])] spids: [1362] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:progress) op: Equal rhs: {(DQ ('dummy to ensure this is not empty'))} spids: [1366] ) ] spids: [1366] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:start_timestamp) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(date)} {(SQ <'+%s'>)})]) left_token: <Left_CommandSub '$('> spids: [1373 1379] ) } spids: [1372] ) ] spids: [1372] ) ] spids: [16777215 1359] ) ] spids: [16777215 1381] ) (If arms: [ (if_arm cond: [ (AndOr children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$filter_index'))}) (AndOr children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name '$filter_tree'))}) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$filter_subdir'))}) ] op_id: Op_DPipe ) ] op_id: Op_DPipe ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:need_index) op:Equal rhs:{(t)} spids:[1419])] spids: [1419] ) ] spids: [16777215 1416] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:need_index) op:Equal rhs:{(SQ )} spids:[1425])] spids: [1425] ) ] spids: [1422 1427] ) (While cond: [(Sentence child:(C {(read)} {(commit)} {(parents)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:git_filter_branch__commit_count) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{($ VSub_Name '$git_filter_branch__commit_count')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [1443 1448] ) } spids: [1442] ) ] spids: [1442] ) (C {(report_progress)}) (AndOr children: [ (Case to_match: {(DQ ($ VSub_Name '$filter_subdir'))} arms: [ (case_arm pat_list: [{(DQ )}] action: [ (If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$need_index'))})] action: [ (SimpleCommand words: [{(git)} {(read-tree)} {(-i)} {(-m)} {($ VSub_Name '$commit')}] more_env: [ (env_pair name: GIT_ALLOW_NULL_SHA1 val: {(1)} spids: [1484] ) ] ) ] spids: [16777215 1481] ) ] spids: [16777215 1498] ) ] spids: [16777215 1467 1501 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:err) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [ {(git)} {(read-tree)} {(-i)} {(-m)} {($ VSub_Name '$commit') (Lit_Other ':') (DQ ($ VSub_Name '$filter_subdir')) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [1533] ) ] more_env: [ (env_pair name: GIT_ALLOW_NULL_SHA1 val: {(1)} spids: [1514] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [1513 1535] ) } spids: [1512] ) ] spids: [1512] ) (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Pipeline children: [ (C {(git)} {(rev-parse)} {(-q)} {(--verify)} {($ VSub_Name '$commit') (Lit_Other ':') (DQ ($ VSub_Name '$filter_subdir')) } ) ] negated: True ) ] action: [(C {(rm)} {(-f)} {(DQ ($ VSub_Name '$GIT_INDEX_FILE'))})] spids: [16777215 1561] ) ] else_action: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$err'))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1578] ) ] ) (C {(false)}) ] spids: [1573 1589] ) ] spids: [1539] ) ] op_id: Op_DPipe ) ] spids: [1504 1505 16777215 1595] ) ] spids: [1456 1462 1595] ) (C {(die)} {(DQ ('Could not initialize the index'))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_COMMIT) op: Equal rhs: {($ VSub_Name '$commit')} spids: [1607] ) ] spids: [1607] ) (C {(export)} {(GIT_COMMIT)}) (AndOr children: [ (SimpleCommand words: [{(git)} {(cat-file)} {(commit)} {(DQ ($ VSub_Name '$commit'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(../commit)} spids: [1626] ) ] ) (C {(die)} {(DQ ('Cannot read commit ') ($ VSub_Name '$commit'))}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(eval)} { (DQ (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(set_ident)}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(../commit)} spids: [1647] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [1644 1649] ) ) } ) (C {(die)} {(DQ ('setting author/committer failed for commit ') ($ VSub_Name '$commit'))} ) ] op_id: Op_DPipe ) (AndOr children: [ (SimpleCommand words: [{(eval)} {(DQ ($ VSub_Name '$filter_env'))}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [1669] ) ] ) (C {(die)} {(DQ ('env filter failed: ') ($ VSub_Name '$filter_env'))}) ] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$filter_tree'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr children: [ (C {(git)} {(checkout-index)} {(-f)} {(-u)} {(-a)}) (C {(die)} {(DQ ('Could not checkout the index'))}) ] op_id: Op_DPipe ) (C {(git)} {(clean)} {(-d)} {(-q)} {(-f)} {(-x)}) (AndOr children: [ (SimpleCommand words: [{(eval)} {(DQ ($ VSub_Name '$filter_tree'))}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [1746] ) ] ) (C {(die)} {(DQ ('tree filter failed: ') ($ VSub_Name '$filter_tree'))}) ] op_id: Op_DPipe ) (AndOr children: [ (Subshell child: (AndOr children: [ (C {(git)} {(diff-index)} {(-r)} {(--name-only)} {(--ignore-submodules)} {($ VSub_Name '$commit')} {(--)} ) (C {(git)} {(ls-files)} {(--others)}) ] op_id: Op_DAmp ) redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tempdir')) (/tree-state)} spids: [1791] ) ] spids: [1762 1789] ) (C {(exit)}) ] op_id: Op_DPipe ) (AndOr children: [ (SimpleCommand words: [{(git)} {(update-index)} {(--add)} {(--replace)} {(--remove)} {(--stdin)}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tempdir')) (/tree-state)} spids: [1817] ) ] ) (C {(exit)}) ] op_id: Op_DPipe ) ] spids: [16777215 1696] ) ] spids: [16777215 1829] ) (AndOr children: [ (SimpleCommand words: [{(eval)} {(DQ ($ VSub_Name '$filter_index'))}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [1839] ) ] ) (C {(die)} {(DQ ('index filter failed: ') ($ VSub_Name '$filter_index'))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:parentstr) op:Equal rhs:{(SQ )} spids:[1855])] spids: [1855] ) (ForEach iter_name: parent iter_words: [{($ VSub_Name '$parents')}] do_arg_iter: False body: (DoGroup children: [ (ForEach iter_name: reparent iter_words: [ { (CommandSubPart command_list: (CommandList children: [(C {(map)} {(DQ ($ VSub_Name '$parent'))})] ) left_token: <Left_CommandSub '$('> spids: [1876 1882] ) } ] do_arg_iter: False body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Name '$parentstr') (' '))} arms: [ (case_arm pat_list: [ {(Lit_Other '*') (DQ (' -p ') ($ VSub_Name '$reparent') (' ')) (Lit_Other '*') } ] spids: [1898 1905 1908 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:parentstr) op: Equal rhs: { (DQ ($ VSub_Name '$parentstr') (' -p ') ($ VSub_Name '$reparent') ) } spids: [1915] ) ] spids: [1915] ) ] spids: [1911 1912 1923 16777215] ) ] spids: [1888 1895 1926] ) ] spids: [1885 1929] ) spids: [1875 1883] ) ] spids: [1867 1932] ) spids: [1863 1865] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$filter_parent'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:parentstr) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$parentstr'))}) (C {(eval)} {(DQ ($ VSub_Name '$filter_parent'))}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [1951 1965] ) ) } spids: [1949] ) ] spids: [1949] ) (C {(die)} {(DQ ('parent filter failed: ') ($ VSub_Name '$filter_parent'))}) ] op_id: Op_DPipe ) ] spids: [16777215 1946] ) ] spids: [16777215 1979] ) (AndOr children: [ (Pipeline children: [ (BraceGroup children: [ (While cond: [ (AndOr children: [ (SimpleCommand words: [{(read)} {(-r)} {(header_line)}] more_env: [(env_pair name:IFS val:{(SQ )} spids:[1988])] ) (C {(test)} {(-n)} {(DQ ($ VSub_Name '$header_line'))}) ] op_id: Op_DAmp ) ] body: (DoGroup children: [ (Sentence child: (C {(Lit_Other ':')}) terminator: <Op_Semi ';'> ) ] spids: [2009 2020] ) ) (C {(cat)}) ] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(../commit)} spids: [2032] ) ] spids: [1983] ) (SimpleCommand words: [{(eval)} {(DQ ($ VSub_Name '$filter_msg'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(../message)} spids: [2044] ) ] ) ] negated: False ) (C {(die)} {(DQ ('msg filter failed: ') ($ VSub_Name '$filter_msg'))}) ] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$need_index'))})] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tree) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(write-tree)})]) left_token: <Left_CommandSub '$('> spids: [2075 2079] ) } spids: [2074] ) ] spids: [2074] ) ] spids: [16777215 2071] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tree) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-parse)} {(DQ ($ VSub_Name '$commit') ('^{tree}'))}) ] ) left_token: <Left_CommandSub '$('> spids: [2086 2095] ) } spids: [2085] ) ] spids: [2085] ) ] spids: [2082 2098] ) (AndOr children: [ (SimpleCommand words: [ {(Lit_Other '@') (SHELL_PATH) (Lit_Other '@')} {(-c)} {(DQ ($ VSub_Name '$filter_commit'))} {(DQ ('git commit-tree'))} {(DQ ($ VSub_Name '$tree'))} {($ VSub_Name '$parentstr')} ] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(../message)} spids: [2126] ) (Redir op_id: Redir_Great fd: 16777215 arg_word: {(../map/) ($ VSub_Name '$commit')} spids: [2130] ) ] more_env: [(env_pair name:workdir val:{($ VSub_Name '$workdir')} spids:[2101])] ) (C {(die)} {(DQ ('could not write rewritten commit'))}) ] op_id: Op_DPipe ) ] spids: [1439 2144] ) redirects: [(Redir op_id:Redir_Less fd:16777215 arg_word:{(../revs)} spids:[2146])] ) (If arms: [ (if_arm cond: [(C {(test)} {(DQ ($ VSub_Name '$remap_to_ancestor'))} {(Lit_Other '=')} {(t)})] action: [ (While cond: [(C {(read)} {(ref)})] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha1) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-parse)} {(DQ ($ VSub_Name '$ref')) (Lit_Other '^') (0)} ) ] ) left_token: <Left_CommandSub '$('> spids: [2192 2202] ) } spids: [2191] ) ] spids: [2191] ) (AndOr children: [ (C {(test)} {(-f)} {(DQ ($ VSub_Name '$workdir')) (/../map/) ($ VSub_Name '$sha1')} ) (ControlFlow token:<ControlFlow_Continue continue>) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ancestor) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-list)} {(--simplify-merges)} {(-1)} {(DQ ($ VSub_Name '$ref'))} {(DQ ($ VSub_At '$@'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [2221 2237] ) } spids: [2220] ) ] spids: [2220] ) (AndOr children: [ (C {(test)} {(DQ ($ VSub_Name '$ancestor'))}) (SimpleCommand words: [ {(echo)} { (CommandSubPart command_list: (CommandList children: [(C {(map)} {($ VSub_Name '$ancestor')})] ) left_token: <Left_CommandSub '$('> spids: [2250 2254] ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {(DQ ($ VSub_Name '$workdir')) (/../map/) ($ VSub_Name '$sha1')} spids: [2256] ) ] ) ] op_id: Op_DAmp ) ] spids: [2188 2265] ) redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tempdir')) (/heads)} spids: [2267] ) ] ) ] spids: [16777215 2178] ) ] spids: [16777215 2274] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_x40) op: Equal rhs: {(SQ <'[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'>)} spids: [2281] ) ] spids: [2281] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_x40) op: Equal rhs: { (DQ ($ VSub_Name '$_x40') ($ VSub_Name '$_x40') ($ VSub_Name '$_x40') ($ VSub_Name '$_x40') ($ VSub_Name '$_x40') ($ VSub_Name '$_x40') ($ VSub_Name '$_x40') ($ VSub_Name '$_x40') ) } spids: [2286] ) ] spids: [2286] ) (C {(echo)}) (While cond: [(C {(read)} {(ref)})] body: (DoGroup children: [ (AndOr children: [ (C {(test)} {(-f)} {(DQ ($ VSub_Name '$orig_namespace') ($ VSub_Name '$ref'))}) (ControlFlow token:<ControlFlow_Continue continue>) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha1) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-parse)} {(DQ ($ VSub_Name '$ref')) (Lit_Other '^') (0)}) ] ) left_token: <Left_CommandSub '$('> spids: [2329 2339] ) } spids: [2328] ) ] spids: [2328] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:rewritten) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(map)} {($ VSub_Name '$sha1')})]) left_token: <Left_CommandSub '$('> spids: [2343 2347] ) } spids: [2342] ) ] spids: [2342] ) (AndOr children: [ (C {(test)} {($ VSub_Name '$sha1')} {(Lit_Other '=')} {(DQ ($ VSub_Name '$rewritten'))}) (AndOr children: [ (C {(warn)} {(DQ ("WARNING: Ref '") ($ VSub_Name '$ref') ("' is unchanged"))}) (ControlFlow token:<ControlFlow_Continue continue>) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Case to_match: {(DQ ($ VSub_Name '$rewritten'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [ (C {(echo)} {(DQ ("Ref '") ($ VSub_Name '$ref') ("' was deleted"))}) (AndOr children: [ (C {(git)} {(update-ref)} {(-m)} {(DQ ('filter-branch: delete'))} {(-d)} {(DQ ($ VSub_Name '$ref'))} {($ VSub_Name '$sha1')} ) (C {(die)} {(DQ ('Could not delete ') ($ VSub_Name '$ref'))}) ] op_id: Op_DPipe ) ] spids: [16777215 2390 2431 16777215] ) (case_arm pat_list: [{($ VSub_Name '$_x40')}] action: [ (C {(echo)} {(DQ ("Ref '") ($ VSub_Name '$ref') ("' was rewritten"))}) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [ {(git)} {(update-ref)} {(-m)} {(DQ ('filter-branch: rewrite'))} {(DQ ($ VSub_Name '$ref'))} {($ VSub_Name '$rewritten')} {($ VSub_Name '$sha1')} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [2471] ) ] ) ] negated: True ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} { (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(cat-file)} {(-t)} {(DQ ($ VSub_Name '$ref'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [2482 2492] ) } {(Lit_Other '=')} {(tag)} ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(-z)} {(DQ ($ VSub_Name '$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 2513] ) ] spids: [16777215 2530] ) ] spids: [16777215 2499] ) ] else_action: [ (C {(die)} {(DQ ('Could not rewrite ') ($ VSub_Name '$ref'))}) ] spids: [2533 2544] ) ] spids: [16777215 2475] ) ] spids: [16777215 2547] ) ] spids: [2434 2435 2550 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(warn)} { (DQ ("WARNING: '") ($ VSub_Name '$ref') ("' was rewritten into multiple commits:") ) } ) (C {(warn)} {(DQ ($ VSub_Name '$rewritten'))}) (C {(warn)} { (DQ ("WARNING: Ref '") ($ VSub_Name '$ref') ("' points to the first one now.")) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:rewritten) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$rewritten'))}) (C {(head)} {(-n)} {(1)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [2587 2601] ) } spids: [2586] ) ] spids: [2586] ) (AndOr children: [ (C {(git)} {(update-ref)} {(-m)} {(DQ ('filter-branch: rewrite to first'))} {(DQ ($ VSub_Name '$ref'))} {($ VSub_Name '$rewritten')} {($ VSub_Name '$sha1')} ) (C {(die)} {(DQ ('Could not rewrite ') ($ VSub_Name '$ref'))}) ] op_id: Op_DPipe ) ] spids: [2553 2554 2635 16777215] ) ] spids: [2379 2385 2638] ) (AndOr children: [ (C {(git)} {(update-ref)} {(-m)} {(DQ ('filter-branch: backup'))} {(DQ ($ VSub_Name '$orig_namespace') ($ VSub_Name '$ref'))} {($ VSub_Name '$sha1')} ) (C {(exit)}) ] op_id: Op_DPipe ) ] spids: [2306 2663] ) redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ ($ VSub_Name '$tempdir')) (/heads)} spids: [2665] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$filter_tag_name'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (C {(git)} {(for-each-ref)} {(--format) (Lit_Other '=') (SQ <'%(objectname) %(objecttype) %(refname)'>)} {(refs/tags)} ) (While cond: [ (Sentence child: (C {(read)} {(sha1)} {(type)} {(ref)}) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ref) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name ref> suffix_op: (StringUnary op_id: VOp1_Pound arg_word: {(refs) (Lit_Slash /) (tags) (Lit_Slash /)} ) spids: [2728 2735] ) ) } spids: [2726] ) ] spids: [2726] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$type'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (commit))} {(-a)} {(DQ ($ VSub_Name '$type'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (tag))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (ControlFlow token:<ControlFlow_Continue continue>) terminator: <Op_Semi ';'> ) ] spids: [16777215 2774] ) ] spids: [16777215 2781] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$type'))} {(Lit_Other '=')} {(DQ (tag))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha1t) op: Equal rhs: {(DQ ($ VSub_Name '$sha1'))} spids: [2809] ) ] spids: [2809] ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha1) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(rev-parse)} {(-q)} {(DQ ($ VSub_Name '$sha1')) (Lit_Other '^') (Lit_LBrace '{') (commit) (Lit_RBrace '}') } ) ] ) left_token: <Left_CommandSub '$('> spids: [2817 2831] ) ) } spids: [2815] ) ] spids: [2815] ) (ControlFlow token: <ControlFlow_Continue continue> ) ] op_id: Op_DPipe ) ] spids: [16777215 2802] ) ] spids: [16777215 2839] ) (AndOr children: [ (C {(Lit_Other '[')} {(-f)} {(DQ (../map/) ($ VSub_Name '$sha1'))} {(Lit_Other ']')} ) (ControlFlow token: <ControlFlow_Continue continue> ) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:new_sha1) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(DQ (../map/) ($ VSub_Name '$sha1'))})] ) left_token: <Left_CommandSub '$('> spids: [2861 2868] ) ) } spids: [2859] ) ] spids: [2859] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_COMMIT) op: Equal rhs: {(DQ ($ VSub_Name '$sha1'))} spids: [2872] ) ] spids: [2872] ) (C {(export)} {(GIT_COMMIT)}) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:new_ref) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$ref'))}) (C {(eval)} {(DQ ($ VSub_Name '$filter_tag_name'))}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [2885 2899] ) ) } spids: [2883] ) ] spids: [2883] ) (C {(die)} {(DQ ('tag name filter failed: ') ($ VSub_Name '$filter_tag_name'))} ) ] op_id: Op_DPipe ) (C {(echo)} { (DQ ($ VSub_Name '$ref') (' -> ') ($ VSub_Name '$new_ref') (' (') ($ VSub_Name '$sha1') (' -> ') ($ VSub_Name '$new_sha1') (')') ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$type'))} {(Lit_Other '=')} {(DQ (tag))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:new_sha1) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (Subshell child: (CommandList children: [ (C {(printf)} { (SQ < 'object %s\\ntype commit\\ntag %s\\n' > ) } {(DQ ($ VSub_Name '$new_sha1'))} {(DQ ($ VSub_Name '$new_ref'))} ) (Pipeline children: [ (C {(git)} {(cat-file)} {(tag)} {(DQ ($ VSub_Name '$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: False ) ] ) spids: [2952 3016] ) (C {(git)} {(mktag)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [2950 3024] ) } spids: [2949] ) ] spids: [2949] ) (C {(die)} { (DQ ('Could not create new tag object for ') ($ VSub_Name '$ref') ) } ) ] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [ (Pipeline children: [ (C {(git)} {(cat-file)} {(tag)} {(DQ ($ VSub_Name '$ref'))}) (SimpleCommand words: [ {(sane_grep)} {(SQ <'^-----BEGIN PGP SIGNATURE-----'>)} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [3059] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [3062] ) ] ) ] negated: False ) ] action: [ (C {(warn)} { (DQ ('gpg signature stripped from tag object ') ($ VSub_Name '$sha1t') ) } ) ] spids: [16777215 3066] ) ] spids: [16777215 3077] ) ] spids: [16777215 2946] ) ] spids: [16777215 3080] ) (AndOr children: [ (C {(git)} {(update-ref)} {(DQ (refs/tags/) ($ VSub_Name '$new_ref'))} {(DQ ($ VSub_Name '$new_sha1'))} ) (C {(die)} {(DQ ('Could not write tag ') ($ VSub_Name '$new_ref'))}) ] op_id: Op_DPipe ) ] spids: [2723 3108] ) ) ] negated: False ) ] spids: [16777215 2694] ) ] spids: [16777215 3110] ) (C {(cd)} {(DQ ($ VSub_Name '$orig_dir'))}) (C {(rm)} {(-rf)} {(DQ ($ VSub_Name '$tempdir'))}) (C {(trap)} {(-)} {(0)}) (C {(unset)} {(GIT_DIR)} {(GIT_WORK_TREE)} {(GIT_INDEX_FILE)}) (AndOr children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$ORIG_GIT_DIR'))}) (BraceGroup children: [ (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_DIR) op: Equal rhs: {(DQ ($ VSub_Name '$ORIG_GIT_DIR'))} spids: [3156] ) ] spids: [3156] ) (C {(export)} {(GIT_DIR)}) ] op_id: Op_DAmp ) ] spids: [3153] ) ] op_id: Op_DPipe ) (AndOr children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$ORIG_GIT_WORK_TREE'))}) (BraceGroup children: [ (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_WORK_TREE) op: Equal rhs: {(DQ ($ VSub_Name '$ORIG_GIT_WORK_TREE'))} spids: [3182] ) ] spids: [3182] ) (C {(export)} {(GIT_WORK_TREE)}) ] op_id: Op_DAmp ) ] spids: [3179] ) ] op_id: Op_DPipe ) (AndOr children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$ORIG_GIT_INDEX_FILE'))}) (BraceGroup children: [ (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_INDEX_FILE) op: Equal rhs: {(DQ ($ VSub_Name '$ORIG_GIT_INDEX_FILE'))} spids: [3209] ) ] spids: [3209] ) (C {(export)} {(GIT_INDEX_FILE)}) ] op_id: Op_DAmp ) ] spids: [3206] ) ] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(is_bare_repository)})]) left_token: <Left_CommandSub '$('> spids: [3229 3231] ) ) } {(Lit_Other '=')} {(false)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr children: [(C {(git)} {(read-tree)} {(-u)} {(-m)} {(HEAD)}) (C {(exit)})] op_id: Op_DPipe ) ] spids: [16777215 3241] ) ] spids: [16777215 3258] ) (C {(exit)} {(0)}) ] )