(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ (Token id:Id.Lit_Chars val:'Test commit notes organized in subtrees' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:number_of_commits)
          op: assign_op.Equal
          rhs: {(100)}
          spids: [15]
        )
      ]
    )
    (command.ShFunction
      name: start_note_commit
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(test_tick)})
                (command.Simple
                  words: [{(cat)}]
                  redirects: [
                    (redir.HereDoc
                      op: (Token id:Id.Redir_DLess val:'<<' span_id:34)
                      fd: -1
                      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')
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: verify_notes
      body: 
        (command.BraceGroup
          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.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:77)
                          fd: -1
                          arg_word: {(output)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:i)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_DollarName '$number_of_commits')}
                      spids: [84]
                    )
                  ]
                )
                (command.WhileUntil
                  keyword: (Token id:Id.KW_While val:while span_id:90)
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$i')} {(-gt)} {(0)} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:101)
                    )
                  ]
                  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 name:i)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (word_part.ArithSub
                                            anode: 
                                              (arith_expr.Binary
                                                op_id: Id.Arith_Minus
                                                left: 
                                                  (arith_expr.ArithWord
                                                    w: {($ Id.VSub_DollarName '$i')}
                                                  )
                                                right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                              )
                                          )
                                        }
                                      spids: [126]
                                    )
                                  ]
                                )
                              ]
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:133)
                        )
                      ]
                    )
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:138)
                      fd: -1
                      arg_word: {(expect)}
                    )
                  ]
                )
                (C {(test_cmp)} {(expect)} {(output)})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {(DQ ('setup: create ') ($ Id.VSub_DollarName '$number_of_commits') (' commits'))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:163) (Token id:Id.Lit_Chars val:'\n' span_id:164) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:165) (Token id:Id.Lit_Chars val:'\t\tnr=0 &&\n' span_id:166) 
          (Token
            id: Id.Lit_Chars
            val: '\t\twhile [ $nr -lt $number_of_commits ]; do\n'
            span_id: 167
          ) (Token id:Id.Lit_Chars val:'\t\t\tnr=$(($nr+1)) &&\n' span_id:168) 
          (Token id:Id.Lit_Chars val:'\t\t\ttest_tick &&\n' span_id:169) (Token id:Id.Lit_Chars val:'\t\t\tcat <<INPUT_END\n' span_id:170) 
          (Token id:Id.Lit_Chars val:'commit refs/heads/master\n' span_id:171) 
          (Token
            id: Id.Lit_Chars
            val: 'committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n'
            span_id: 172
          ) (Token id:Id.Lit_Chars val:'data <<COMMIT\n' span_id:173) 
          (Token id:Id.Lit_Chars val:'commit #$nr\n' span_id:174) (Token id:Id.Lit_Chars val:'COMMIT\n' span_id:175) (Token id:Id.Lit_Chars val:'\n' span_id:176) 
          (Token id:Id.Lit_Chars val:'M 644 inline file\n' span_id:177) (Token id:Id.Lit_Chars val:'data <<EOF\n' span_id:178) 
          (Token id:Id.Lit_Chars val:'file in commit #$nr\n' span_id:179) (Token id:Id.Lit_Chars val:'EOF\n' span_id:180) (Token id:Id.Lit_Chars val:'\n' span_id:181) 
          (Token id:Id.Lit_Chars val:'INPUT_END\n' span_id:182) (Token id:Id.Lit_Chars val:'\n' span_id:183) (Token id:Id.Lit_Chars val:'\t\tdone &&\n' span_id:184) 
          (Token id:Id.Lit_Chars val:'\t\ttest_tick &&\n' span_id:185) (Token id:Id.Lit_Chars val:'\t\tcat <<INPUT_END\n' span_id:186) 
          (Token id:Id.Lit_Chars val:'commit refs/notes/commits\n' span_id:187) 
          (Token
            id: Id.Lit_Chars
            val: 'committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n'
            span_id: 188
          ) (Token id:Id.Lit_Chars val:'data <<COMMIT\n' span_id:189) 
          (Token id:Id.Lit_Chars val:'no notes\n' span_id:190) (Token id:Id.Lit_Chars val:'COMMIT\n' span_id:191) (Token id:Id.Lit_Chars val:'\n' span_id:192) 
          (Token id:Id.Lit_Chars val:'deleteall\n' span_id:193) (Token id:Id.Lit_Chars val:'\n' span_id:194) (Token id:Id.Lit_Chars val:'INPUT_END\n' span_id:195) 
          (Token id:Id.Lit_Chars val:'\n' span_id:196) (Token id:Id.Lit_Chars val:'\t) |\n' span_id:197) 
          (Token id:Id.Lit_Chars val:'\tgit fast-import --quiet &&\n' span_id:198) (Token id:Id.Lit_Chars val:'\tgit config core.notesRef refs/notes/commits\n' span_id:199)
        )
      }
    )
    (command.ShFunction
      name: test_sha1_based
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DAmp]
                          children: [
                            (C {(start_note_commit)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:nr)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$number_of_commits')}
                                  spids: [219]
                                )
                              ]
                            )
                            (command.Pipeline
                              children: [
                                (C {(git)} {(rev-list)} {(refs/heads/master)})
                                (command.WhileUntil
                                  keyword: (Token id:Id.KW_While val:while span_id:234)
                                  cond: [
                                    (command.Sentence
                                      child: (C {(read)} {(sha1)})
                                      terminator: (Token id:Id.Op_Semi val:';' span_id:239)
                                    )
                                  ]
                                  body: 
                                    (command.DoGroup
                                      children: [
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:note_path)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (command_sub
                                                    left_token: 
                                                      (Token
                                                        id: Id.Left_DollarParen
                                                        val: '$('
                                                        span_id: 245
                                                      )
                                                    command_list: 
                                                      (command.CommandList
                                                        children: [
                                                          (command.Pipeline
                                                            children: [
                                                              (C {(echo)} 
                                                                {(DQ ($ Id.VSub_DollarName '$sha1'))}
                                                              )
                                                              (C {(sed)} {(DQ ($ Id.VSub_Number '$1'))})
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                  )
                                                }
                                              spids: [244]
                                            )
                                          ]
                                        )
                                        (command.AndOr
                                          ops: [Id.Op_DAmp]
                                          children: [
                                            (command.Simple
                                              words: [{(cat)}]
                                              redirects: [
                                                (redir.HereDoc
                                                  op: (Token id:Id.Redir_DLess val:'<<' span_id:264)
                                                  fd: -1
                                                  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')
                                                  ]
                                                )
                                              ]
                                            )
                                            (command.ShAssignment
                                              pairs: [
                                                (assign_pair
                                                  lhs: (sh_lhs_expr.Name name:nr)
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (word_part.ArithSub
                                                        anode: 
                                                          (arith_expr.Binary
                                                            op_id: Id.Arith_Minus
                                                            left: 
                                                              (arith_expr.ArithWord
                                                                w: {($ Id.VSub_DollarName '$nr')}
                                                              )
                                                            right: 
                                                              (arith_expr.ArithWord
                                                                w: {(Id.Lit_Digits 1)}
                                                              )
                                                          )
                                                      )
                                                    }
                                                  spids: [282]
                                                )
                                              ]
                                            )
                                          ]
                                        )
                                      ]
                                    )
                                )
                              ]
                              negated: F
                            )
                          ]
                        )
                      ]
                    )
                )
                (C {(git)} {(fast-import)} {(--quiet)})
              ]
              negated: F
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'test notes in 2/38-fanout' span_id:311))} {(SQ (Token id:Id.Lit_Chars val:'test_sha1_based "s|^..|&/|"' span_id:315))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verify notes in 2/38-fanout' span_id:321))} {(SQ (Token id:Id.Lit_Chars val:verify_notes span_id:325))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'test notes in 2/2/36-fanout' span_id:332))} {(SQ (Token id:Id.Lit_Chars val:'test_sha1_based "s|^\\(..\\)\\(..\\)|\\1/\\2/|"' span_id:336))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verify notes in 2/2/36-fanout' span_id:342))} {(SQ (Token id:Id.Lit_Chars val:verify_notes span_id:346))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'test notes in 2/2/2/34-fanout' span_id:353))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test_sha1_based "s|^\\(..\\)\\(..\\)\\(..\\)|\\1/\\2/\\3/|"'
            span_id: 357
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verify notes in 2/2/2/34-fanout' span_id:363))} {(SQ (Token id:Id.Lit_Chars val:verify_notes span_id:367))}
    )
    (command.ShFunction
      name: test_same_notes
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DAmp]
                          children: [
                            (C {(start_note_commit)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:nr)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$number_of_commits')}
                                  spids: [387]
                                )
                              ]
                            )
                            (command.Pipeline
                              children: [
                                (C {(git)} {(rev-list)} {(refs/heads/master)})
                                (command.WhileUntil
                                  keyword: (Token id:Id.KW_While val:while span_id:402)
                                  cond: [
                                    (command.Sentence
                                      child: (C {(read)} {(sha1)})
                                      terminator: (Token id:Id.Op_Semi val:';' span_id:407)
                                    )
                                  ]
                                  body: 
                                    (command.DoGroup
                                      children: [
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:first_note_path)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (command_sub
                                                    left_token: 
                                                      (Token
                                                        id: Id.Left_DollarParen
                                                        val: '$('
                                                        span_id: 413
                                                      )
                                                    command_list: 
                                                      (command.CommandList
                                                        children: [
                                                          (command.Pipeline
                                                            children: [
                                                              (C {(echo)} 
                                                                {(DQ ($ Id.VSub_DollarName '$sha1'))}
                                                              )
                                                              (C {(sed)} {(DQ ($ Id.VSub_Number '$1'))})
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                  )
                                                }
                                              spids: [412]
                                            )
                                          ]
                                        )
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:second_note_path)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (command_sub
                                                    left_token: 
                                                      (Token
                                                        id: Id.Left_DollarParen
                                                        val: '$('
                                                        span_id: 431
                                                      )
                                                    command_list: 
                                                      (command.CommandList
                                                        children: [
                                                          (command.Pipeline
                                                            children: [
                                                              (C {(echo)} 
                                                                {(DQ ($ Id.VSub_DollarName '$sha1'))}
                                                              )
                                                              (C {(sed)} {(DQ ($ Id.VSub_Number '$2'))})
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                  )
                                                }
                                              spids: [430]
                                            )
                                          ]
                                        )
                                        (command.AndOr
                                          ops: [Id.Op_DAmp]
                                          children: [
                                            (command.Simple
                                              words: [{(cat)}]
                                              redirects: [
                                                (redir.HereDoc
                                                  op: (Token id:Id.Redir_DLess val:'<<' span_id:450)
                                                  fd: -1
                                                  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')
                                                  ]
                                                )
                                              ]
                                            )
                                            (command.ShAssignment
                                              pairs: [
                                                (assign_pair
                                                  lhs: (sh_lhs_expr.Name name:nr)
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (word_part.ArithSub
                                                        anode: 
                                                          (arith_expr.Binary
                                                            op_id: Id.Arith_Minus
                                                            left: 
                                                              (arith_expr.ArithWord
                                                                w: {($ Id.VSub_DollarName '$nr')}
                                                              )
                                                            right: 
                                                              (arith_expr.ArithWord
                                                                w: {(Id.Lit_Digits 1)}
                                                              )
                                                          )
                                                      )
                                                    }
                                                  spids: [477]
                                                )
                                              ]
                                            )
                                          ]
                                        )
                                      ]
                                    )
                                )
                              ]
                              negated: F
                            )
                          ]
                        )
                      ]
                    )
                )
                (C {(git)} {(fast-import)} {(--quiet)})
              ]
              negated: F
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'test same notes in no fanout and 2/38-fanout' span_id:506))} {(SQ (Token id:Id.Lit_Chars val:'test_same_notes "s|^..|&/|" ""' span_id:510))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verify same notes in no fanout and 2/38-fanout' span_id:516))} {(SQ (Token id:Id.Lit_Chars val:verify_notes span_id:520))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'test same notes in no fanout and 2/2/36-fanout' span_id:527))} {(SQ (Token id:Id.Lit_Chars val:'test_same_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" ""' span_id:531))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'verify same notes in no fanout and 2/2/36-fanout'
            span_id: 537
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:verify_notes span_id:541))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test same notes in 2/38-fanout and 2/2/36-fanout'
            span_id: 548
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test_same_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" "s|^..|&/|"'
            span_id: 552
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'verify same notes in 2/38-fanout and 2/2/36-fanout'
            span_id: 558
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:verify_notes span_id:562))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test same notes in 2/2/2/34-fanout and 2/2/36-fanout'
            span_id: 569
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'test_same_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" "s|^\\(..\\)\\(..\\)\\(..\\)|\\1/\\2/\\3/|"'
            span_id: 573
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'verify same notes in 2/2/2/34-fanout and 2/2/36-fanout'
            span_id: 579
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:verify_notes span_id:583))}
    )
    (command.ShFunction
      name: test_concatenated_notes
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DAmp]
                          children: [
                            (C {(start_note_commit)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:nr)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$number_of_commits')}
                                  spids: [603]
                                )
                              ]
                            )
                            (command.Pipeline
                              children: [
                                (C {(git)} {(rev-list)} {(refs/heads/master)})
                                (command.WhileUntil
                                  keyword: (Token id:Id.KW_While val:while span_id:618)
                                  cond: [
                                    (command.Sentence
                                      child: (C {(read)} {(sha1)})
                                      terminator: (Token id:Id.Op_Semi val:';' span_id:623)
                                    )
                                  ]
                                  body: 
                                    (command.DoGroup
                                      children: [
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:first_note_path)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (command_sub
                                                    left_token: 
                                                      (Token
                                                        id: Id.Left_DollarParen
                                                        val: '$('
                                                        span_id: 629
                                                      )
                                                    command_list: 
                                                      (command.CommandList
                                                        children: [
                                                          (command.Pipeline
                                                            children: [
                                                              (C {(echo)} 
                                                                {(DQ ($ Id.VSub_DollarName '$sha1'))}
                                                              )
                                                              (C {(sed)} {(DQ ($ Id.VSub_Number '$1'))})
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                  )
                                                }
                                              spids: [628]
                                            )
                                          ]
                                        )
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:second_note_path)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (command_sub
                                                    left_token: 
                                                      (Token
                                                        id: Id.Left_DollarParen
                                                        val: '$('
                                                        span_id: 647
                                                      )
                                                    command_list: 
                                                      (command.CommandList
                                                        children: [
                                                          (command.Pipeline
                                                            children: [
                                                              (C {(echo)} 
                                                                {(DQ ($ Id.VSub_DollarName '$sha1'))}
                                                              )
                                                              (C {(sed)} {(DQ ($ Id.VSub_Number '$2'))})
                                                            ]
                                                            negated: F
                                                          )
                                                        ]
                                                      )
                                                  )
                                                }
                                              spids: [646]
                                            )
                                          ]
                                        )
                                        (command.AndOr
                                          ops: [Id.Op_DAmp]
                                          children: [
                                            (command.Simple
                                              words: [{(cat)}]
                                              redirects: [
                                                (redir.HereDoc
                                                  op: (Token id:Id.Redir_DLess val:'<<' span_id:666)
                                                  fd: -1
                                                  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')
                                                  ]
                                                )
                                              ]
                                            )
                                            (command.ShAssignment
                                              pairs: [
                                                (assign_pair
                                                  lhs: (sh_lhs_expr.Name name:nr)
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (word_part.ArithSub
                                                        anode: 
                                                          (arith_expr.Binary
                                                            op_id: Id.Arith_Minus
                                                            left: 
                                                              (arith_expr.ArithWord
                                                                w: {($ Id.VSub_DollarName '$nr')}
                                                              )
                                                            right: 
                                                              (arith_expr.ArithWord
                                                                w: {(Id.Lit_Digits 1)}
                                                              )
                                                          )
                                                      )
                                                    }
                                                  spids: [693]
                                                )
                                              ]
                                            )
                                          ]
                                        )
                                      ]
                                    )
                                )
                              ]
                              negated: F
                            )
                          ]
                        )
                      ]
                    )
                )
                (C {(git)} {(fast-import)} {(--quiet)})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: verify_concatenated_notes
      body: 
        (command.BraceGroup
          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.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:739)
                          fd: -1
                          arg_word: {(output)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:i)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_DollarName '$number_of_commits')}
                      spids: [746]
                    )
                  ]
                )
                (command.WhileUntil
                  keyword: (Token id:Id.KW_While val:while span_id:752)
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$i')} {(-gt)} {(0)} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:763)
                    )
                  ]
                  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 name:i)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (word_part.ArithSub
                                            anode: 
                                              (arith_expr.Binary
                                                op_id: Id.Arith_Minus
                                                left: 
                                                  (arith_expr.ArithWord
                                                    w: {($ Id.VSub_DollarName '$i')}
                                                  )
                                                right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                              )
                                          )
                                        }
                                      spids: [807]
                                    )
                                  ]
                                )
                              ]
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:814)
                        )
                      ]
                    )
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:819)
                      fd: -1
                      arg_word: {(expect)}
                    )
                  ]
                )
                (C {(test_cmp)} {(expect)} {(output)})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test notes in no fanout concatenated with 2/38-fanout'
            span_id: 838
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:'test_concatenated_notes "s|^..|&/|" ""' span_id:842))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'verify notes in no fanout concatenated with 2/38-fanout'
            span_id: 848
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:verify_concatenated_notes span_id:852))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test notes in no fanout concatenated with 2/2/36-fanout'
            span_id: 859
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test_concatenated_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" ""'
            span_id: 863
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'verify notes in no fanout concatenated with 2/2/36-fanout'
            span_id: 869
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:verify_concatenated_notes span_id:873))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test notes in 2/38-fanout concatenated with 2/2/36-fanout'
            span_id: 880
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test_concatenated_notes "s|^\\(..\\)\\(..\\)|\\1/\\2/|" "s|^..|&/|"'
            span_id: 884
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'verify notes in 2/38-fanout concatenated with 2/2/36-fanout'
            span_id: 890
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:verify_concatenated_notes span_id:894))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test notes in 2/2/36-fanout concatenated with 2/2/2/34-fanout'
            span_id: 901
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'test_concatenated_notes "s|^\\(..\\)\\(..\\)\\(..\\)|\\1/\\2/\\3/|" "s|^\\(..\\)\\(..\\)|\\1/\\2/|"'
            span_id: 905
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'verify notes in 2/2/36-fanout concatenated with 2/2/2/34-fanout'
            span_id: 911
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:verify_concatenated_notes span_id:915))}
    )
    (C {(test_done)})
  ]
)