(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 children: [ (C {(test_tick)}) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess 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") ("from refs/notes/commits^0\n") ("deleteall\n") ) } do_expansion: True here_end: INPUT_END was_filled: True spids: [34] ) ] ) ] op_id: Op_DAmp ) ] spids: [24] ) spids: [19 23] ) (FuncDef name: verify_notes body: (BraceGroup children: [ (AndOr children: [ (Pipeline children: [ (C {(git)} {(log)}) (SimpleCommand words: [{(grep)} {(DQ ("^ "))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(output)} spids:[75])] ) ] negated: False ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: {($ VSub_Name "$number_of_commits")} spids: [82] ) ] spids: [82] ) (AndOr children: [ (While cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$i")} {(-gt)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (Sentence child: (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: [125 130] ) } spids: [124] ) ] spids: [124] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] spids: [101 134] ) redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[136])] ) (C {(test_cmp)} {(expect)} {(output)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [60] ) spids: [55 59] ) (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 children: [ (C {(start_note_commit)}) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: {($ VSub_Name "$number_of_commits")} spids: [217] ) ] spids: [217] ) (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: False ) ] ) left_token: <Left_CommandSub "$("> spids: [243 257] ) } spids: [242] ) ] spids: [242] ) (AndOr children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 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: True spids: [262] ) ] ) (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: [279 284] ) } spids: [278] ) ] spids: [278] ) ] op_id: Op_DAmp ) ] spids: [239 287] ) ) ] negated: False ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [209 290] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: False ) ] spids: [206] ) spids: [201 205] ) (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 children: [ (C {(start_note_commit)}) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: {($ VSub_Name "$number_of_commits")} spids: [383] ) ] spids: [383] ) (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: False ) ] ) left_token: <Left_CommandSub "$("> spids: [409 423] ) } spids: [408] ) ] spids: [408] ) (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: False ) ] ) left_token: <Left_CommandSub "$("> spids: [427 441] ) } spids: [426] ) ] spids: [426] ) (AndOr children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 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: True spids: [446] ) ] ) (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: [472 477] ) } spids: [471] ) ] spids: [471] ) ] op_id: Op_DAmp ) ] spids: [405 480] ) ) ] negated: False ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [375 483] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: False ) ] spids: [372] ) spids: [367 371] ) (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 children: [ (C {(start_note_commit)}) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nr) op: Equal rhs: {($ VSub_Name "$number_of_commits")} spids: [597] ) ] spids: [597] ) (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: False ) ] ) left_token: <Left_CommandSub "$("> spids: [623 637] ) } spids: [622] ) ] spids: [622] ) (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: False ) ] ) left_token: <Left_CommandSub "$("> spids: [641 655] ) } spids: [640] ) ] spids: [640] ) (AndOr children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 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: True spids: [660] ) ] ) (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: [686 691] ) } spids: [685] ) ] spids: [685] ) ] op_id: Op_DAmp ) ] spids: [619 694] ) ) ] negated: False ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [589 697] ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: False ) ] spids: [586] ) spids: [581 585] ) (FuncDef name: verify_concatenated_notes body: (BraceGroup children: [ (AndOr children: [ (Pipeline children: [ (C {(git)} {(log)}) (SimpleCommand words: [{(grep)} {(DQ ("^ "))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(output)} spids:[731])] ) ] negated: False ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: {($ VSub_Name "$number_of_commits")} spids: [738] ) ] spids: [738] ) (AndOr children: [ (While cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$i")} {(-gt)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (Sentence child: (AndOr children: [ (C {(echo)} {(DQ (" commit #") ($ VSub_Name "$i"))}) (AndOr children: [ (C {(echo)} { (DQ (" first note for commit #") ($ VSub_Name "$i")) } ) (AndOr children: [ (C {(echo)} {(DQ (" "))}) (AndOr children: [ (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: [800 805] ) } spids: [799] ) ] spids: [799] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] spids: [757 809] ) redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[811])] ) (C {(test_cmp)} {(expect)} {(output)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [716] ) spids: [711 715] ) (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)}) ] )