(command.CommandList children: [ (command.FuncDef name: set_fake_editor body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(write_script)} {(fake-editor.sh)}] redirects: [ (redir.HereDoc op: <Redir_DLessDash '<<-'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 137 stdin_parts: [ ('case "$1" in\n') ('*/COMMIT_EDITMSG)\n') ('test -z "$EXPECT_HEADER_COUNT" ||\n') ( 'test "$EXPECT_HEADER_COUNT" = "$(sed -n \'1s/^# This is a combination of \\(.*\\) commits\\./\\1/p\' < "$1")" ||\n' ) ('test "# # GETTEXT POISON #" = "$(sed -n \'1p\' < "$1")" ||\n') ('exit\n') ('test -z "$FAKE_COMMIT_MESSAGE" || echo "$FAKE_COMMIT_MESSAGE" > "$1"\n') ('test -z "$FAKE_COMMIT_AMEND" || echo "$FAKE_COMMIT_AMEND" >> "$1"\n') ('exit\n') (';;\n') ('esac\n') ('test -z "$EXPECT_COUNT" ||\n') ('test "$EXPECT_COUNT" = $(sed -e \'/^#/d\' -e \'/^$/d\' < "$1" | wc -l) ||\n') ('exit\n') ('test -z "$FAKE_LINES" && exit\n') ('grep -v \'^#\' < "$1" > "$1".tmp\n') ('rm -f "$1"\n') ("echo 'rebase -i script before editing:'\n") ('cat "$1".tmp\n') ('action=pick\n') ('for line in $FAKE_LINES; do\n') ('case $line in\n') ('squash|fixup|edit|reword|drop)\n') ('action="$line";;\n') ('exec*)\n') ('echo "$line" | sed \'s/_/ /g\' >> "$1";;\n') ('"#")\n') ('echo \'# comment\' >> "$1";;\n') ('">")\n') ('echo >> "$1";;\n') ('bad)\n') ('action="badcmd";;\n') ('fakesha)\n') ('echo "$action XXXXXXX False commit" >> "$1"\n') ('action=pick;;\n') ('*)\n') ('sed -n "${line}s/^pick/$action/p" < "$1".tmp >> "$1"\n') ('action=pick;;\n') ('esac\n') ('done\n') ("echo 'rebase -i script after editing:'\n") ('cat "$1"\n') ] ) ] ) (C {(test_set_editor)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [143 145] ) (/fake-editor.sh) ) } ) ] spids: [84] ) spids: [79 83] ) (command.FuncDef name: set_cat_todo_editor body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(write_script)} {(fake-editor.sh)}] redirects: [ (redir.HereDoc op: <Redir_DLessDash '<<-'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 186 stdin_parts: [('grep "^[^#]" "$1"\n') ('exit 1\n')] ) ] ) (C {(test_set_editor)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [191 193] ) (/fake-editor.sh) ) } ) ] spids: [173] ) spids: [168 172] ) (command.FuncDef name: test_linear_range body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:revlist_merges spids:[214]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(rev-list)} {(--merges)} {(DQ ($ VSub_Number '$2'))}) ] ) left_token: <Left_CommandSub '$('> spids: [215 225] ) } spids: [214] ) ] spids: [214] ) (C {(test)} {(-z)} {(DQ ($ VSub_Name '$revlist_merges'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expected spids:[241]) op: Equal rhs: {($ VSub_Number '$1')} spids: [241] ) ] spids: [241] ) ] ) (C {(set)} {(--)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(log)} {(--reverse)} {(--format) (Lit_Other '=') (Lit_Other '%') (s)} {(DQ ($ VSub_Number '$2'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [249 264] ) } ) (C {(test)} {(DQ ($ VSub_Name '$expected'))} {(Lit_Other '=')} {(DQ ($ VSub_Star '$*'))}) ] spids: [211] ) spids: [206 210] ) (command.FuncDef name: reset_rebase body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(test_might_fail)} {(git)} {(rebase)} {(--abort)}) (C {(git)} {(reset)} {(--hard)}) (C {(git)} {(clean)} {(-f)}) ] ) ] spids: [287] ) spids: [282 286] ) (command.FuncDef name: cherry_pick body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(git)} {(cherry-pick)} {(-n)} {(DQ ($ VSub_Number '$2'))}) (C {(git)} {(commit)} {(-m)} {(DQ ($ VSub_Number '$1'))}) (C {(git)} {(tag)} {(DQ ($ VSub_Number '$1'))}) ] ) ] spids: [324] ) spids: [319 323] ) (command.FuncDef name: revert body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(git)} {(revert)} {(-n)} {(DQ ($ VSub_Number '$2'))}) (C {(git)} {(commit)} {(-m)} {(DQ ($ VSub_Number '$1'))}) (C {(git)} {(tag)} {(DQ ($ VSub_Number '$1'))}) ] ) ] spids: [369] ) spids: [364 368] ) (command.FuncDef name: make_empty body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(git)} {(commit)} {(--allow-empty)} {(-m)} {(DQ ($ VSub_Number '$1'))}) (C {(git)} {(tag)} {(DQ ($ VSub_Number '$1'))}) ] ) ] spids: [414] ) spids: [409 413] ) ] )