(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'Test commit notes organized in subtrees'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:number_of_commits) op:Equal rhs:{(100)} spids:[15])] spids: [15] ) (FuncDef name: start_note_commit body: (BraceGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(test_tick)}) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(INPUT_END)} here_end_span_id: 52 stdin_parts: [ ('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') ('from refs/notes/commits^0\n') ('deleteall\n') ] ) ] ) ] ) ] spids: [24] ) spids: [19 23] ) (FuncDef name: verify_notes body: (BraceGroup children: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (Pipeline children: [ (C {(git)} {(log)}) (SimpleCommand words: [{(grep)} {(DQ ('^ '))}] redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(output)})] ) ] negated: F ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: {($ VSub_Name '$number_of_commits')} spids: [84] ) ] spids: [84] ) (WhileUntil keyword: <KW_While while> cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$i')} {(-gt)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (Sentence child: (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(echo)} {(DQ (' commit #') ($ VSub_Name '$i'))}) (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: [127 132] ) } spids: [126] ) ] spids: [126] ) ] ) terminator: <Op_Semi ';'> ) ] spids: [103 136] ) redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (C {(test_cmp)} {(expect)} {(output)}) ] ) ] spids: [62] ) spids: [57 61] ) (C {(test_expect_success)} {(DQ ('setup: create ') ($ VSub_Name '$number_of_commits') (' commits'))} { (SQ <'\n'> <'\n'> <'\t(\n'> <'\t\tnr=0 &&\n'> <'\t\twhile [ $nr -lt $number_of_commits ]; do\n'> <'\t\t\tnr=$(($nr+1)) &&\n'> <'\t\t\ttest_tick &&\n'> <'\t\t\tcat <<INPUT_END\n'> <'commit refs/heads/master\n'> <'committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n'> <'data <<COMMIT\n'> <'commit #$nr\n'> <'COMMIT\n'> <'\n'> <'M 644 inline file\n'> <'data <<EOF\n'> <'file in commit #$nr\n'> <'EOF\n'> <'\n'> <'INPUT_END\n'> <'\n'> <'\t\tdone &&\n'> <'\t\ttest_tick &&\n'> <'\t\tcat <<INPUT_END\n'> <'commit refs/notes/commits\n'> <'committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n'> <'data <<COMMIT\n'> <'no notes\n'> <'COMMIT\n'> <'\n'> <'deleteall\n'> <'\n'> <'INPUT_END\n'> <'\n'> <'\t) |\n'> <'\tgit fast-import --quiet &&\n'> <'\tgit config core.notesRef refs/notes/commits\n'> ) } ) (FuncDef name: test_sha1_based body: (BraceGroup children: [ (Pipeline children: [ (Subshell child: (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(start_note_commit)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: {($ VSub_Name '$number_of_commits')} spids: [219] ) ] spids: [219] ) (Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (WhileUntil keyword: <KW_While while> cond: [(Sentence child:(C {(read)} {(sha1)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:note_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$sha1'))}) (C {(sed)} {(DQ ($ VSub_Number '$1'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [245 259] ) } spids: [244] ) ] spids: [244] ) (AndOr ops: [Op_DAmp] children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(INPUT_END)} here_end_span_id: 279 stdin_parts: [ ('M 100644 inline ') ($ VSub_Name '$note_path') ('\n') ('data <<EOF\n') ('note for commit #') ($ VSub_Name '$nr') ('\n') ('EOF\n') ('\n') ] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$nr')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [283 288] ) } spids: [282] ) ] spids: [282] ) ] ) ] spids: [241 291] ) ) ] negated: F ) ] ) spids: [211 294] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] spids: [208] ) spids: [203 207] ) (C {(test_expect_success)} {(SQ <'test notes in 2/38-fanout'>)} {(SQ <'test_sha1_based "s|^..|&/|"'>)} ) (C {(test_expect_success)} {(SQ <'verify notes in 2/38-fanout'>)} {(SQ <verify_notes>)}) (C {(test_expect_success)} {(SQ <'test notes in 2/2/36-fanout'>)} {(SQ <'test_sha1_based "s|^\\(..\\)\\(..\\)|\\1/\\2/|"'>)} ) (C {(test_expect_success)} {(SQ <'verify notes in 2/2/36-fanout'>)} {(SQ <verify_notes>)}) (C {(test_expect_success)} {(SQ <'test notes in 2/2/2/34-fanout'>)} {(SQ <'test_sha1_based "s|^\\(..\\)\\(..\\)\\(..\\)|\\1/\\2/\\3/|"'>)} ) (C {(test_expect_success)} {(SQ <'verify notes in 2/2/2/34-fanout'>)} {(SQ <verify_notes>)}) (FuncDef name: test_same_notes body: (BraceGroup children: [ (Pipeline children: [ (Subshell child: (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(start_note_commit)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: {($ VSub_Name '$number_of_commits')} spids: [387] ) ] spids: [387] ) (Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (WhileUntil keyword: <KW_While while> cond: [(Sentence child:(C {(read)} {(sha1)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:first_note_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$sha1'))}) (C {(sed)} {(DQ ($ VSub_Number '$1'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [413 427] ) } spids: [412] ) ] spids: [412] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:second_note_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$sha1'))}) (C {(sed)} {(DQ ($ VSub_Number '$2'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [431 445] ) } spids: [430] ) ] spids: [430] ) (AndOr ops: [Op_DAmp] children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(INPUT_END)} here_end_span_id: 474 stdin_parts: [ ('M 100644 inline ') ($ VSub_Name '$second_note_path') ('\n') ('data <<EOF\n') ('note for commit #') ($ VSub_Name '$nr') ('\n') ('EOF\n') ('\n') ('M 100644 inline ') ($ VSub_Name '$first_note_path') ('\n') ('data <<EOF\n') ('note for commit #') ($ VSub_Name '$nr') ('\n') ('EOF\n') ('\n') ] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$nr')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [478 483] ) } spids: [477] ) ] spids: [477] ) ] ) ] spids: [409 486] ) ) ] negated: F ) ] ) spids: [379 489] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] spids: [376] ) spids: [371 375] ) (C {(test_expect_success)} {(SQ <'test same notes in no fanout and 2/38-fanout'>)} {(SQ <'test_same_notes "s|^..|&/|" ""'>)} ) (C {(test_expect_success)} {(SQ <'verify same notes in no fanout and 2/38-fanout'>)} {(SQ <verify_notes>)} ) (C {(test_expect_success)} {(SQ <'test same notes in no fanout and 2/2/36-fanout'>)} {(SQ <'test_same_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" ""'>)} ) (C {(test_expect_success)} {(SQ <'verify same notes in no fanout and 2/2/36-fanout'>)} {(SQ <verify_notes>)} ) (C {(test_expect_success)} {(SQ <'test same notes in 2/38-fanout and 2/2/36-fanout'>)} {(SQ <'test_same_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" "s|^..|&/|"'>)} ) (C {(test_expect_success)} {(SQ <'verify same notes in 2/38-fanout and 2/2/36-fanout'>)} {(SQ <verify_notes>)} ) (C {(test_expect_success)} {(SQ <'test same notes in 2/2/2/34-fanout and 2/2/36-fanout'>)} { (SQ < 'test_same_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" "s|^\\(..\\)\\(..\\)\\(..\\)|\\1/\\2/\\3/|"' > ) } ) (C {(test_expect_success)} {(SQ <'verify same notes in 2/2/2/34-fanout and 2/2/36-fanout'>)} {(SQ <verify_notes>)} ) (FuncDef name: test_concatenated_notes body: (BraceGroup children: [ (Pipeline children: [ (Subshell child: (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(start_note_commit)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: {($ VSub_Name '$number_of_commits')} spids: [603] ) ] spids: [603] ) (Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (WhileUntil keyword: <KW_While while> cond: [(Sentence child:(C {(read)} {(sha1)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:first_note_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$sha1'))}) (C {(sed)} {(DQ ($ VSub_Number '$1'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [629 643] ) } spids: [628] ) ] spids: [628] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:second_note_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$sha1'))}) (C {(sed)} {(DQ ($ VSub_Number '$2'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [647 661] ) } spids: [646] ) ] spids: [646] ) (AndOr ops: [Op_DAmp] children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(INPUT_END)} here_end_span_id: 690 stdin_parts: [ ('M 100644 inline ') ($ VSub_Name '$second_note_path') ('\n') ('data <<EOF\n') ('second note for commit #') ($ VSub_Name '$nr') ('\n') ('EOF\n') ('\n') ('M 100644 inline ') ($ VSub_Name '$first_note_path') ('\n') ('data <<EOF\n') ('first note for commit #') ($ VSub_Name '$nr') ('\n') ('EOF\n') ('\n') ] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$nr')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [694 699] ) } spids: [693] ) ] spids: [693] ) ] ) ] spids: [625 702] ) ) ] negated: F ) ] ) spids: [595 705] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] spids: [592] ) spids: [587 591] ) (FuncDef name: verify_concatenated_notes body: (BraceGroup children: [ (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (Pipeline children: [ (C {(git)} {(log)}) (SimpleCommand words: [{(grep)} {(DQ ('^ '))}] redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(output)})] ) ] negated: F ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: {($ VSub_Name '$number_of_commits')} spids: [746] ) ] spids: [746] ) (WhileUntil keyword: <KW_While while> cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$i')} {(-gt)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (Sentence child: (AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(echo)} {(DQ (' commit #') ($ VSub_Name '$i'))}) (C {(echo)} {(DQ (' first note for commit #') ($ VSub_Name '$i'))}) (C {(echo)} {(DQ (' '))}) (C {(echo)} {(DQ (' second 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: [808 813] ) } spids: [807] ) ] spids: [807] ) ] ) terminator: <Op_Semi ';'> ) ] spids: [765 817] ) redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (C {(test_cmp)} {(expect)} {(output)}) ] ) ] spids: [724] ) spids: [719 723] ) (C {(test_expect_success)} {(SQ <'test notes in no fanout concatenated with 2/38-fanout'>)} {(SQ <'test_concatenated_notes "s|^..|&/|" ""'>)} ) (C {(test_expect_success)} {(SQ <'verify notes in no fanout concatenated with 2/38-fanout'>)} {(SQ <verify_concatenated_notes>)} ) (C {(test_expect_success)} {(SQ <'test notes in no fanout concatenated with 2/2/36-fanout'>)} {(SQ <'test_concatenated_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" ""'>)} ) (C {(test_expect_success)} {(SQ <'verify notes in no fanout concatenated with 2/2/36-fanout'>)} {(SQ <verify_concatenated_notes>)} ) (C {(test_expect_success)} {(SQ <'test notes in 2/38-fanout concatenated with 2/2/36-fanout'>)} {(SQ <'test_concatenated_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" "s|^..|&/|"'>)} ) (C {(test_expect_success)} {(SQ <'verify notes in 2/38-fanout concatenated with 2/2/36-fanout'>)} {(SQ <verify_concatenated_notes>)} ) (C {(test_expect_success)} {(SQ <'test notes in 2/2/36-fanout concatenated with 2/2/2/34-fanout'>)} { (SQ < 'test_concatenated_notes "s|^\\(..\\)\\(..\\)\\(..\\)|\\1/\\2/\\3/|" "s|^\\(..\\)\\(..\\)|\\1/\\2/|"' > ) } ) (C {(test_expect_success)} {(SQ <'verify notes in 2/2/36-fanout concatenated with 2/2/2/34-fanout'>)} {(SQ <verify_concatenated_notes>)} ) (C {(test_done)}) ] )