(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'Test commit notes organized in subtrees'>)} spids: [4] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'number_of_commits='> name:number_of_commits) op: assign_op.Equal rhs: {<100>} spids: [15] ) ] redirects: [] ) (command.ShFunction name: start_note_commit body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test_tick>}) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<INPUT_END>} here_end_span_id: 52 stdin_parts: [ <'commit refs/notes/commits\n'> <'committer '> ($ Id.VSub_DollarName GIT_COMMITTER_NAME) <' <'> ($ Id.VSub_DollarName GIT_COMMITTER_EMAIL) <'> '> ($ Id.VSub_DollarName GIT_COMMITTER_DATE) <'\n'> <'data <<COMMIT\n'> <'notes\n'> <'COMMIT\n'> <'\n'> <'from refs/notes/commits^0\n'> <'deleteall\n'> ] ) ) ] more_env: [] do_fork: T ) ] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: verify_notes body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (command.Pipeline children: [ (C {<git>} {<log>}) (command.Simple words: [{<grep>} {(DQ <'^ '>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<output>} ) ] more_env: [] do_fork: T ) ] negated: F stderr_indices: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'i='> name:i) op: assign_op.Equal rhs: {($ Id.VSub_DollarName number_of_commits)} spids: [84] ) ] redirects: [] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName i)} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {<echo>} {(DQ <' commit #'> ($ Id.VSub_DollarName i))}) (C {<echo>} {(DQ <' note for commit #'> ($ Id.VSub_DollarName i))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'i='> name:i) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName i)} right: {<Id.Lit_Digits 1>} ) ) } spids: [126] ) ] redirects: [] ) ] ) terminator: <Id.Op_Semi _> ) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] ) (C {<test_cmp>} {<expect>} {<output>}) ] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<test_expect_success>} {(DQ <'setup: create '> ($ Id.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.ShFunction name: test_sha1_based body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Pipeline children: [ (command.Subshell child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {<start_note_commit>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nr='> name:nr) op: assign_op.Equal rhs: {($ Id.VSub_DollarName number_of_commits)} spids: [219] ) ] redirects: [] ) (command.Pipeline children: [ (C {<git>} {<rev-list>} {<'refs/heads/master'>}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<read>} {<sha1>}) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'note_path='> name: note_path ) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName sha1))}) (C {<sed>} {(DQ ($ Id.VSub_Number 1))}) ] negated: F stderr_indices: [] ) right: <Id.Eof_RParen _> ) } spids: [244] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<INPUT_END>} here_end_span_id: 279 stdin_parts: [ <'M 100644 inline '> ($ Id.VSub_DollarName note_path) <'\n'> <'data <<EOF\n'> <'note for commit #'> ($ Id.VSub_DollarName nr) <'\n'> <'EOF\n'> <'\n'> ] ) ) ] more_env: [] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'nr='> name: nr ) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName nr)} right: {<Id.Lit_Digits 1>} ) ) } spids: [282] ) ] redirects: [] ) ] ) ] ) redirects: [] ) ] negated: F stderr_indices: [] ) ] ) redirects: [] ) (C {<git>} {<fast-import>} {<--quiet>}) ] negated: F stderr_indices: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (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.ShFunction name: test_same_notes body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Pipeline children: [ (command.Subshell child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {<start_note_commit>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nr='> name:nr) op: assign_op.Equal rhs: {($ Id.VSub_DollarName number_of_commits)} spids: [387] ) ] redirects: [] ) (command.Pipeline children: [ (C {<git>} {<rev-list>} {<'refs/heads/master'>}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<read>} {<sha1>}) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'first_note_path='> name: first_note_path ) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName sha1))}) (C {<sed>} {(DQ ($ Id.VSub_Number 1))}) ] negated: F stderr_indices: [] ) right: <Id.Eof_RParen _> ) } spids: [412] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'second_note_path='> name: second_note_path ) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName sha1))}) (C {<sed>} {(DQ ($ Id.VSub_Number 2))}) ] negated: F stderr_indices: [] ) right: <Id.Eof_RParen _> ) } spids: [430] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<INPUT_END>} here_end_span_id: 474 stdin_parts: [ <'M 100644 inline '> ($ Id.VSub_DollarName second_note_path) <'\n'> <'data <<EOF\n'> <'note for commit #'> ($ Id.VSub_DollarName nr) <'\n'> <'EOF\n'> <'\n'> <'M 100644 inline '> ($ Id.VSub_DollarName first_note_path) <'\n'> <'data <<EOF\n'> <'note for commit #'> ($ Id.VSub_DollarName nr) <'\n'> <'EOF\n'> <'\n'> ] ) ) ] more_env: [] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'nr='> name: nr ) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName nr)} right: {<Id.Lit_Digits 1>} ) ) } spids: [477] ) ] redirects: [] ) ] ) ] ) redirects: [] ) ] negated: F stderr_indices: [] ) ] ) redirects: [] ) (C {<git>} {<fast-import>} {<--quiet>}) ] negated: F stderr_indices: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (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.ShFunction name: test_concatenated_notes body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Pipeline children: [ (command.Subshell child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {<start_note_commit>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nr='> name:nr) op: assign_op.Equal rhs: {($ Id.VSub_DollarName number_of_commits)} spids: [603] ) ] redirects: [] ) (command.Pipeline children: [ (C {<git>} {<rev-list>} {<'refs/heads/master'>}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<read>} {<sha1>}) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'first_note_path='> name: first_note_path ) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName sha1))}) (C {<sed>} {(DQ ($ Id.VSub_Number 1))}) ] negated: F stderr_indices: [] ) right: <Id.Eof_RParen _> ) } spids: [628] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'second_note_path='> name: second_note_path ) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName sha1))}) (C {<sed>} {(DQ ($ Id.VSub_Number 2))}) ] negated: F stderr_indices: [] ) right: <Id.Eof_RParen _> ) } spids: [646] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<INPUT_END>} here_end_span_id: 690 stdin_parts: [ <'M 100644 inline '> ($ Id.VSub_DollarName second_note_path) <'\n'> <'data <<EOF\n'> <'second note for commit #'> ($ Id.VSub_DollarName nr) <'\n'> <'EOF\n'> <'\n'> <'M 100644 inline '> ($ Id.VSub_DollarName first_note_path) <'\n'> <'data <<EOF\n'> <'first note for commit #'> ($ Id.VSub_DollarName nr) <'\n'> <'EOF\n'> <'\n'> ] ) ) ] more_env: [] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'nr='> name: nr ) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName nr)} right: {<Id.Lit_Digits 1>} ) ) } spids: [693] ) ] redirects: [] ) ] ) ] ) redirects: [] ) ] negated: F stderr_indices: [] ) ] ) redirects: [] ) (C {<git>} {<fast-import>} {<--quiet>}) ] negated: F stderr_indices: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: verify_concatenated_notes body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (command.Pipeline children: [ (C {<git>} {<log>}) (command.Simple words: [{<grep>} {(DQ <'^ '>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<output>} ) ] more_env: [] do_fork: T ) ] negated: F stderr_indices: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'i='> name:i) op: assign_op.Equal rhs: {($ Id.VSub_DollarName number_of_commits)} spids: [746] ) ] redirects: [] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName i)} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<echo>} {(DQ <' commit #'> ($ Id.VSub_DollarName i))}) (C {<echo>} {(DQ <' first note for commit #'> ($ Id.VSub_DollarName i))} ) (C {<echo>} {(DQ <' '>)}) (C {<echo>} {(DQ <' second note for commit #'> ($ Id.VSub_DollarName i))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'i='> name:i) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName i)} right: {<Id.Lit_Digits 1>} ) ) } spids: [807] ) ] redirects: [] ) ] ) terminator: <Id.Op_Semi _> ) ] ) redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] ) (C {<test_cmp>} {<expect>} {<output>}) ] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (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>}) ] )