(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_id: Redir_DLess fd: 16777215 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') ('from refs/notes/commits^0\n') ('deleteall\n') ) } do_expansion: True here_end: INPUT_END was_filled: T spids: [34] ) ] ) ] ) ] 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_id: Redir_Great fd: 16777215 arg_word: {(output)} spids: [76] ) ] ) ] negated: F ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: {($ VSub_Name '$number_of_commits')} spids: [83] ) ] spids: [83] ) (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: [126 131] ) } spids: [125] ) ] spids: [125] ) ] ) terminator: <Op_Semi ';'> ) ] spids: [102 135] ) redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect)} spids:[137])] ) (C {(test_cmp)} {(expect)} {(output)}) ] ) ] spids: [61] ) spids: [56 60] ) (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: [218] ) ] spids: [218] ) (Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (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: [244 258] ) } spids: [243] ) ] spids: [243] ) (AndOr ops: [Op_DAmp] children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('M 100644 inline ') ($ VSub_Name '$note_path') ('\n') ('data <<EOF\n') ('note for commit #') ($ VSub_Name '$nr') ('\n') ('EOF\n') ('\n') ) } do_expansion: True here_end: INPUT_END was_filled: T spids: [263] ) ] ) (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: [281 286] ) } spids: [280] ) ] spids: [280] ) ] ) ] spids: [240 289] ) ) ] negated: F ) ] ) spids: [210 292] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] spids: [207] ) spids: [202 206] ) (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: [385] ) ] spids: [385] ) (Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (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: [411 425] ) } spids: [410] ) ] spids: [410] ) (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: [429 443] ) } spids: [428] ) ] spids: [428] ) (AndOr ops: [Op_DAmp] children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('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') ) } do_expansion: True here_end: INPUT_END was_filled: T spids: [448] ) ] ) (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: [475 480] ) } spids: [474] ) ] spids: [474] ) ] ) ] spids: [407 483] ) ) ] negated: F ) ] ) spids: [377 486] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] spids: [374] ) spids: [369 373] ) (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: [600] ) ] spids: [600] ) (Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (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: [626 640] ) } spids: [625] ) ] spids: [625] ) (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: [644 658] ) } spids: [643] ) ] spids: [643] ) (AndOr ops: [Op_DAmp] children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('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') ) } do_expansion: True here_end: INPUT_END was_filled: T spids: [663] ) ] ) (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: [690 695] ) } spids: [689] ) ] spids: [689] ) ] ) ] spids: [622 698] ) ) ] negated: F ) ] ) spids: [592 701] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] spids: [589] ) spids: [584 588] ) (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_id: Redir_Great fd: 16777215 arg_word: {(output)} spids: [735] ) ] ) ] negated: F ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: {($ VSub_Name '$number_of_commits')} spids: [742] ) ] spids: [742] ) (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: [804 809] ) } spids: [803] ) ] spids: [803] ) ] ) terminator: <Op_Semi ';'> ) ] spids: [761 813] ) redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect)} spids:[815])] ) (C {(test_cmp)} {(expect)} {(output)}) ] ) ] spids: [720] ) spids: [715 719] ) (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)}) ] )