(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'Test commit notes index (expensive!)'>)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./test-lib.sh)}) (FuncDef name: create_repo body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:number_of_commits) op: Equal rhs: {($ VSub_Number '$1')} spids: [32] ) ] spids: [32] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:nr) op:Equal rhs:{(0)} spids:[36])] spids: [36] ) (AndOr children: [ (C {(test)} {(-d)} {(.git)}) (BraceGroup children: [ (AndOr children: [ (C {(git)} {(init)}) (AndOr children: [ (Pipeline children: [ (Subshell child: (AndOr children: [ (While cond: [ (C {(test)} {($ VSub_Name '$nr')} {(-lt)} {($ VSub_Name '$number_of_commits')} ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w: {($ VSub_Name '$nr')} ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [76 81] ) } spids: [75] ) ] spids: [75] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:mark) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w: {($ VSub_Name '$nr')} ) right: (ArithWord w: {($ VSub_Name '$nr')} ) ) spids: [85 90] ) } spids: [84] ) ] spids: [84] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:notemark) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w: {($ VSub_Name '$mark')} ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [94 99] ) } spids: [93] ) ] spids: [93] ) (AndOr children: [ (C {(test_tick)}) (AndOr children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLessDash fd: -1 body: { (DQ ('commit refs/heads/master\n') ('mark :') ($ VSub_Name '$mark') ('\n') ('committer ') ($ VSub_Name '$GIT_COMMITTER_NAME') (' <') ($ VSub_Name '$GIT_COMMITTER_EMAIL' ) ('> ') ($ VSub_Name '$GIT_COMMITTER_DATE') ('\n') ('data <<COMMIT\n') ('commit #') ($ VSub_Name '$nr') ('\n') ('COMMIT\n') ('\n') ('M 644 inline file\n') ('data <<EOF\n') ('file in commit #') ($ VSub_Name '$nr') ('\n') ('EOF\n') ('\n') ('blob\n') ('mark :') ($ VSub_Name '$notemark') ('\n') ('data <<EOF\n') ('note for commit #') ($ VSub_Name '$nr') ('\n') ('EOF\n') ('\n') ) } do_expansion: True here_end: INPUT_END was_filled: True spids: [109] ) ] ) (SimpleCommand words: [ {(echo)} { (DQ ('N :') ($ VSub_Name '$notemark') (' :') ($ VSub_Name '$mark') ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(note_commit)} spids: [159] ) ] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [72 163] ) ) (AndOr children: [ (C {(test_tick)}) (AndOr children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLessDash fd: -1 body: { (DQ ('commit refs/notes/commits\n') ('committer ') ($ VSub_Name '$GIT_COMMITTER_NAME') (' <') ($ VSub_Name '$GIT_COMMITTER_EMAIL') ('> ') ($ VSub_Name '$GIT_COMMITTER_DATE') ('\n') ('data <<COMMIT\n') ('notes\n') ('COMMIT\n') ('\n') ) } do_expansion: True here_end: INPUT_END was_filled: True spids: [175] ) ] ) (C {(cat)} {(note_commit)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [58 200] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: False ) (C {(git)} {(config)} {(core.notesRef)} {(refs/notes/commits)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [48] ) ] op_id: Op_DPipe ) ] spids: [29] ) spids: [24 28] ) (FuncDef name: test_notes body: (BraceGroup children: [ (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:count) op: Equal rhs: {($ VSub_Number '$1')} spids: [236] ) ] spids: [236] ) (AndOr children: [ (C {(git)} {(config)} {(core.notesRef)} {(refs/notes/commits)}) (AndOr children: [ (Pipeline children: [ (C {(git)} {(log)}) (SimpleCommand words: [{(grep)} {(DQ ('^ '))}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(output)} spids: [265] ) ] ) ] negated: False ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: {($ VSub_Name '$count')} spids: [271] ) ] spids: [271] ) (AndOr children: [ (While cond: [(C {(test)} {($ VSub_Name '$i')} {(-gt)} {(0)})] body: (DoGroup children: [ (AndOr children: [ (C {(echo)} {(DQ (' commit #') ($ VSub_Name '$i'))}) (AndOr children: [ (C {(echo)} {(DQ (' note for commit #') ($ VSub_Name '$i'))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w: {($ VSub_Name '$i')} ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [312 317] ) } spids: [311] ) ] spids: [311] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [288 320] ) redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(expect)} spids: [322] ) ] ) (C {(test_cmp)} {(expect)} {(output)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [233] ) spids: [228 232] ) (SimpleCommand words: [{(write_script)} {(time_notes)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {('\tmode=$1\n') ('\ti=1\n') ('\twhile test $i -lt $2\n') ('\tdo\n') ('\t\tcase $1 in\n') ('\t\tno-notes)\n') ('\t\t\tGIT_NOTES_REF=non-existing\n') ('\t\t\texport GIT_NOTES_REF\n') ('\t\t\t;;\n') ('\t\tnotes)\n') ('\t\t\tunset GIT_NOTES_REF\n') ('\t\t\t;;\n') ('\t\tesac\n') ('\t\tgit log\n') ('\t\ti=$(($i+1))\n') ('\tdone >/dev/null\n') } do_expansion: False here_end: EOF was_filled: True spids: [341] ) ] ) (FuncDef name: time_notes body: (BraceGroup children: [ (ForEach iter_name: mode iter_words: [{(no-notes)} {(notes)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name '$mode')}) (C {(/usr/bin/time)} {(../time_notes)} {($ VSub_Name '$mode')} {($ VSub_Number '$1')}) ] spids: [365 382] ) spids: [359 -1] ) ] spids: [351] ) spids: [346 350] ) (FuncDef name: do_tests body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:count) op: Equal rhs: {($ VSub_Number '$1')} spids: [395] ) (assign_pair lhs: (LhsName name:pr) op: Equal rhs: { (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{}) spids: [399 402] ) } spids: [398] ) ] spids: [395] ) (C {(test_expect_success)} {($ VSub_Name '$pr')} {(DQ ('setup ') ($ VSub_Name '$count'))} { (SQ <'\n'> <'\t\tmkdir "$count" &&\n'> <'\t\t(\n'> <'\t\t\tcd "$count" &&\n'> <'\t\t\tcreate_repo "$count"\n'> <'\t\t)\n'> <'\t'> ) } ) (C {(test_expect_success)} {($ VSub_Name '$pr')} {(SQ <'notes work'>)} { (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd "$count" &&\n'> <'\t\t\ttest_notes "$count"\n'> <'\t\t)\n'> <'\t'> ) } ) (C {(test_expect_success)} { (DQ (USR_BIN_TIME) (BracedVarSub token: <VSub_Name pr> suffix_op: (StringUnary op_id:VTest_ColonPlus arg_word:{(',') ($ VSub_Name '$pr')}) spids: [450 455] ) ) } {(SQ <'notes timing with /usr/bin/time'>)} { (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd "$count" &&\n'> <'\t\t\ttime_notes 100\n'> <'\t\t)\n'> <'\t'> ) } ) ] spids: [392] ) spids: [387 391] ) (C {(do_tests)} {(10)}) (ForEach iter_name: count iter_words: [{(100)} {(1000)} {(10000)}] do_arg_iter: False body: (DoGroup children: [(C {(do_tests)} {(DQ ($ VSub_Name '$count'))} {(EXPENSIVE)})] spids: [490 501] ) spids: [483 -1] ) (C {(test_done)}) ] )