(List (= scope= flags=0 words=[] bindings=[('test_description', {[SQ ]})]) (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]} ) (Com {[LIT_CHARS test_set_prereq]} {[LIT_CHARS NOT_EXPENSIVE]} ) (AndOr OP_AND_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub GIT_PATCHID_TIMING_TESTS]]} ) (Com {[LIT_CHARS test_set_prereq]} {[LIT_CHARS EXPENSIVE]} ) ) (AndOr OP_AND_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -x]} {[LIT_CHARS /usr/bin/time]} ) (Com {[LIT_CHARS test_set_prereq]} {[LIT_CHARS USR_BIN_TIME]} ) ) (FunctionDef count [] (List (= scope= flags=0 words=[] bindings=[('i', {[LIT_CHARS 0]})]) (While (Com {[LIT_CHARS test]} {[VarSub i]} {[LIT_CHARS -lt]} {[VarSub 1]} ) (List (Com {[LIT_CHARS echo]} {[DQ [VarSub i]]} ) (= scope= flags=0 words=[] bindings=[('i', {[ArithSub {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}]})]) ) ) ) ) (FunctionDef scramble [] (List (= scope= flags=0 words=[] bindings=[('i', {[LIT_CHARS 0]})]) (While (Com {[LIT_CHARS read]} {[LIT_CHARS x]} ) (List (If (Com {[LIT_CHARS test]} {[VarSub i]} {[LIT_CHARS -ne]} {[LIT_CHARS 0]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub x]]} ) ) (= scope= flags=0 words=[] bindings=[('i', {[ArithSub {A2 AS_OP_PERCENT {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 10]}}}]})]) ) ) (Com {[LIT_CHARS mv]} {[LIT_CHARS -f]} {[DQ [VarSub 1][LIT_CHARS .new]]} {[DQ [VarSub 1]]} ) ) ) (FunctionDef run [] (List (Com {[LIT_CHARS echo]} {[\ LIT_ESCAPED_CHAR "\\$"]} {[DQ [VarSub @]]} ) (Com {[LIT_CHARS /usr/bin/time]} {[DQ [VarSub @]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) ) ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (FunctionDef do_tests [] (List (= scope= flags=0 words=[] bindings=[('pr', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('nlines', {[VarSub 2]})]) (Com {[LIT_CHARS test_expect_success]} {[VarSub pr]} {[DQ [LIT_CHARS "setup: "][VarSub nlines][LIT_CHARS " lines"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\trm -f .gitattributes &&\n"][LIT_CHARS "\t\tgit checkout -q -f master &&\n"][LIT_CHARS "\t\tgit reset --hard root &&\n"][LIT_CHARS "\t\tcount "][VarSub nlines][LIT_CHARS " >file &&\n"][LIT_CHARS "\t\tgit add file &&\n"][LIT_CHARS "\t\tgit commit -q -m initial &&\n"][LIT_CHARS "\t\tgit branch -f other &&\n"][LIT_CHARS "\n"][LIT_CHARS "\t\tscramble file &&\n"][LIT_CHARS "\t\tgit add file &&\n"][LIT_CHARS "\t\tgit commit -q -m 'change big file' &&\n"][LIT_CHARS "\n"][LIT_CHARS "\t\tgit checkout -q other &&\n"][LIT_CHARS "\t\t: >newfile &&\n"][LIT_CHARS "\t\tgit add newfile &&\n"][LIT_CHARS "\t\tgit commit -q -m 'add small file' &&\n"][LIT_CHARS "\n"][LIT_CHARS "\t\tgit cherry-pick master >/dev/null 2>&1\n"][LIT_CHARS "\t"]]} ) (Com {[LIT_CHARS test_debug]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\trun git diff master^"][\ LIT_ESCAPED_CHAR "\\!"][LIT_CHARS "\n"][LIT_CHARS "\t"]]} ) (Com {[LIT_CHARS test_expect_success]} {[VarSub pr]} {[SQ ]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\techo 'file binary' >.gitattributes\n"][LIT_CHARS "\t"]]} ) (Com {[LIT_CHARS test_debug]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\trun git format-patch --stdout master &&\n"][LIT_CHARS "\t\trun git format-patch --stdout --ignore-if-in-upstream master\n"][LIT_CHARS "\t"]]} ) (Com {[LIT_CHARS test_expect_success]} {[VarSub pr]} {[SQ ]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\tgit checkout -q master &&\n"][LIT_CHARS "\t\tscramble file &&\n"][LIT_CHARS "\t\tgit add file &&\n"][LIT_CHARS "\t\tgit commit -q -m 'change big file again' &&\n"][LIT_CHARS "\t\tgit checkout -q other^{} &&\n"][LIT_CHARS "\t\tgit rebase master &&\n"][LIT_CHARS "\t\ttest_must_fail test -n "][\ LIT_ESCAPED_CHAR "\\\""][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS "(git rev-list master...HEAD~)"][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "\n"][LIT_CHARS "\t"]]} ) (Com {[LIT_CHARS test_expect_success]} {[VarSub pr]} {[SQ ]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\tgit branch -f squashed master &&\n"][LIT_CHARS "\t\tgit checkout -q -f squashed &&\n"][LIT_CHARS "\t\tgit reset -q --soft HEAD~2 &&\n"][LIT_CHARS "\t\tgit commit -q -m squashed &&\n"][LIT_CHARS "\t\tgit checkout -q other^{} &&\n"][LIT_CHARS "\t\ttest_must_fail git rebase squashed &&\n"][LIT_CHARS "\t\trm -rf .git/rebase-apply\n"][LIT_CHARS "\t"]]} ) ) ) (Com {[LIT_CHARS do_tests]} {[LIT_CHARS NOT_EXPENSIVE]} {[LIT_CHARS 500]} ) (Com {[LIT_CHARS do_tests]} {[LIT_CHARS EXPENSIVE]} {[LIT_CHARS 50000]} ) (Com {[LIT_CHARS test_done]} ) )