(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) op: Equal rhs: {(SQ <'Test commit notes organized in subtrees'>)} ) ] ) (C {(.)} {(./test-lib.sh)}) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:number_of_commits) op:Equal rhs:{(100)})] ) (command.FuncDef name: start_note_commit body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(test_tick)}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(INPUT_END)} here_end_span_id: 52 stdin_parts: [ ('commit refs/notes/commits\n') ('committer ') ($ VSub_DollarName '$GIT_COMMITTER_NAME') (' <') ($ VSub_DollarName '$GIT_COMMITTER_EMAIL') ('> ') ($ VSub_DollarName '$GIT_COMMITTER_DATE') ('\n') ('data <<COMMIT\n') ('notes\n') ('COMMIT\n') ('\n') ('from refs/notes/commits^0\n') ('deleteall\n') ] ) ] ) ] ) ] ) ) (command.FuncDef name: verify_notes body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (command.Pipeline children: [ (C {(git)} {(log)}) (command.SimpleCommand words: [{(grep)} {(DQ ('^ '))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(output)})] ) ] negated: F ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:i) op: Equal rhs: {($ VSub_DollarName '$number_of_commits')} ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$i')} {(-gt)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(echo)} {(DQ (' commit #') ($ VSub_DollarName '$i'))}) (C {(echo)} {(DQ (' note for commit #') ($ VSub_DollarName '$i'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:i) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$i')} ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) ] ) terminator: <Op_Semi ';'> ) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (C {(test_cmp)} {(expect)} {(output)}) ] ) ] ) ) (C {(test_expect_success)} {(DQ ('setup: create ') ($ VSub_DollarName '$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'> ) } ) (command.FuncDef name: test_sha1_based body: (command.BraceGroup children: [ (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(start_note_commit)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nr) op: Equal rhs: {($ VSub_DollarName '$number_of_commits')} ) ] ) (command.Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(read)} {(sha1)}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:note_path) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$sha1'))} ) (C {(sed)} {(DQ ($ VSub_Number '$1'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(INPUT_END)} here_end_span_id: 279 stdin_parts: [ ('M 100644 inline ') ($ VSub_DollarName '$note_path') ('\n') ('data <<EOF\n') ('note for commit #') ($ VSub_DollarName '$nr') ('\n') ('EOF\n') ('\n') ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nr) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$nr')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) } ) ] ) ] ) ] ) ) ] negated: F ) ] ) ] ) ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] ) ) (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>)}) (command.FuncDef name: test_same_notes body: (command.BraceGroup children: [ (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(start_note_commit)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nr) op: Equal rhs: {($ VSub_DollarName '$number_of_commits')} ) ] ) (command.Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(read)} {(sha1)}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:first_note_path) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$sha1'))} ) (C {(sed)} {(DQ ($ VSub_Number '$1'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:second_note_path) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$sha1'))} ) (C {(sed)} {(DQ ($ VSub_Number '$2'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(INPUT_END)} here_end_span_id: 474 stdin_parts: [ ('M 100644 inline ') ($ VSub_DollarName '$second_note_path') ('\n') ('data <<EOF\n') ('note for commit #') ($ VSub_DollarName '$nr') ('\n') ('EOF\n') ('\n') ('M 100644 inline ') ($ VSub_DollarName '$first_note_path') ('\n') ('data <<EOF\n') ('note for commit #') ($ VSub_DollarName '$nr') ('\n') ('EOF\n') ('\n') ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nr) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$nr')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) } ) ] ) ] ) ] ) ) ] negated: F ) ] ) ] ) ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] ) ) (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>)} ) (command.FuncDef name: test_concatenated_notes body: (command.BraceGroup children: [ (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(start_note_commit)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nr) op: Equal rhs: {($ VSub_DollarName '$number_of_commits')} ) ] ) (command.Pipeline children: [ (C {(git)} {(rev-list)} {(refs/heads/master)}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(read)} {(sha1)}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:first_note_path) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$sha1'))} ) (C {(sed)} {(DQ ($ VSub_Number '$1'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:second_note_path) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$sha1'))} ) (C {(sed)} {(DQ ($ VSub_Number '$2'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(INPUT_END)} here_end_span_id: 690 stdin_parts: [ ('M 100644 inline ') ($ VSub_DollarName '$second_note_path') ('\n') ('data <<EOF\n') ('second note for commit #') ($ VSub_DollarName '$nr') ('\n') ('EOF\n') ('\n') ('M 100644 inline ') ($ VSub_DollarName '$first_note_path') ('\n') ('data <<EOF\n') ('first note for commit #') ($ VSub_DollarName '$nr') ('\n') ('EOF\n') ('\n') ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nr) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$nr')} ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) } ) ] ) ] ) ] ) ) ] negated: F ) ] ) ] ) ) (C {(git)} {(fast-import)} {(--quiet)}) ] negated: F ) ] ) ) (command.FuncDef name: verify_concatenated_notes body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (command.Pipeline children: [ (C {(git)} {(log)}) (command.SimpleCommand words: [{(grep)} {(DQ ('^ '))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(output)})] ) ] negated: F ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:i) op: Equal rhs: {($ VSub_DollarName '$number_of_commits')} ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$i')} {(-gt)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(echo)} {(DQ (' commit #') ($ VSub_DollarName '$i'))}) (C {(echo)} {(DQ (' first note for commit #') ($ VSub_DollarName '$i'))} ) (C {(echo)} {(DQ (' '))}) (C {(echo)} {(DQ (' second note for commit #') ($ VSub_DollarName '$i'))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:i) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$i')} ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) ] ) terminator: <Op_Semi ';'> ) ] ) redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})] ) (C {(test_cmp)} {(expect)} {(output)}) ] ) ] ) ) (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)}) ] )