(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[21])
          op: Equal
          rhs: {(SQ <'test git fast-import of notes objects'>)}
          spids: [21]
        )
      ]
      spids: [21]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 126
          stdin_parts: [
            ('commit refs/heads/master\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('first commit\n')
            ('COMMIT\n')
            ('\n')
            ('M 644 inline foo\n')
            ('data <<EOF\n')
            ('file foo in first commit\n')
            ('EOF\n')
            ('\n')
            ('M 755 inline bar\n')
            ('data <<EOF\n')
            ('file bar in first commit\n')
            ('EOF\n')
            ('\n')
            ('M 644 inline baz/xyzzy\n')
            ('data <<EOF\n')
            ('file baz/xyzzy in first commit\n')
            ('EOF\n')
            ('\n')
            ('commit refs/heads/master\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('second commit\n')
            ('COMMIT\n')
            ('\n')
            ('M 644 inline foo\n')
            ('data <<EOF\n')
            ('file foo in second commit\n')
            ('EOF\n')
            ('\n')
            ('M 755 inline baz/xyzzy\n')
            ('data <<EOF\n')
            ('file baz/xyzzy in second commit\n')
            ('EOF\n')
            ('\n')
            ('commit refs/heads/master\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('third commit\n')
            ('COMMIT\n')
            ('\n')
            ('M 644 inline foo\n')
            ('data <<EOF\n')
            ('file foo in third commit\n')
            ('EOF\n')
            ('\n')
            ('commit refs/heads/master\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('fourth commit\n')
            ('COMMIT\n')
            ('\n')
            ('M 755 inline bar\n')
            ('data <<EOF\n')
            ('file bar in fourth commit\n')
            ('EOF\n')
            ('\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'set up master branch'>)} 
      {(SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> <'\tgit whatchanged master\n'>)}
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:commit4 spids:[142])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(rev-parse)} {(refs/heads/master)})]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [143 149]
              )
            }
          spids: [142]
        )
      ]
      spids: [142]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:commit3 spids:[151])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(rev-parse)} {(DQ ($ VSub_Name '$commit4') ('^'))})]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [152 161]
              )
            }
          spids: [151]
        )
      ]
      spids: [151]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:commit2 spids:[163])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(rev-parse)} {(DQ ($ VSub_Name '$commit4') ('~2'))})]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [164 173]
              )
            }
          spids: [163]
        )
      ]
      spids: [163]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:commit1 spids:[175])
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(rev-parse)} {(DQ ($ VSub_Name '$commit4') ('~3'))})]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [176 185]
              )
            }
          spids: [175]
        )
      ]
      spids: [175]
    )
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 225
          stdin_parts: [
            ('commit refs/notes/test\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('first notes commit\n')
            ('COMMIT\n')
            ('\n')
            ('M 644 inline ')
            ($ VSub_Name '$commit1')
            ('\n')
            ('data <<EOF\n')
            ('first note for first commit\n')
            ('EOF\n')
            ('\n')
            ('M 755 inline ')
            ($ VSub_Name '$commit2')
            ('\n')
            ('data <<EOF\n')
            ('first note for second commit\n')
            ('EOF\n')
            ('\n')
          ]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EXPECT_END)}
          here_end_span_id: 242
          stdin_parts: [
            ('    fourth commit\n')
            ('    third commit\n')
            ('    second commit\n')
            ('    first note for second commit\n')
            ('    first commit\n')
            ('    first note for first commit\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'add notes with simple M command'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/test git log | grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 299
          stdin_parts: [
            ('feature notes\n')
            ('commit refs/notes/test\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('second notes commit\n')
            ('COMMIT\n')
            ('\n')
            ('from refs/notes/test^0\n')
            ('N inline ')
            ($ VSub_Name '$commit3')
            ('\n')
            ('data <<EOF\n')
            ('first note for third commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit4')
            ('\n')
            ('data <<EOF\n')
            ('first note for fourth commit\n')
            ('EOF\n')
            ('\n')
          ]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EXPECT_END)}
          here_end_span_id: 318
          stdin_parts: [
            ('    fourth commit\n')
            ('    first note for fourth commit\n')
            ('    third commit\n')
            ('    first note for third commit\n')
            ('    second commit\n')
            ('    first note for second commit\n')
            ('    first commit\n')
            ('    first note for first commit\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'add notes with simple N command'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/test git log | grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 388
          stdin_parts: [
            ('commit refs/notes/test\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('third notes commit\n')
            ('COMMIT\n')
            ('\n')
            ('from refs/notes/test^0\n')
            ('N inline ')
            ($ VSub_Name '$commit1')
            ('\n')
            ('data <<EOF\n')
            ('second note for first commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit2')
            ('\n')
            ('data <<EOF\n')
            ('second note for second commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit3')
            ('\n')
            ('data <<EOF\n')
            ('second note for third commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit4')
            ('\n')
            ('data <<EOF\n')
            ('second note for fourth commit\n')
            ('EOF\n')
            ('\n')
          ]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EXPECT_END)}
          here_end_span_id: 407
          stdin_parts: [
            ('    fourth commit\n')
            ('    second note for fourth commit\n')
            ('    third commit\n')
            ('    second note for third commit\n')
            ('    second commit\n')
            ('    second note for second commit\n')
            ('    first commit\n')
            ('    second note for first commit\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'update existing notes with N command'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/test git log | grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 553
          stdin_parts: [
            ('commit refs/notes/test\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('fourth notes commit\n')
            ('COMMIT\n')
            ('\n')
            ('from refs/notes/test^0\n')
            ('M 644 inline ')
            (word_part.CommandSubPart
              command_list: 
                (command.CommandList
                  children: [
                    (command.Pipeline
                      children: [
                        (C {(echo)} {(DQ ($ VSub_Name '$commit3'))})
                        (C {(sed)} {(DQ ('s|^..|&/|'))})
                      ]
                      negated: F
                    )
                  ]
                )
              left_token: <Left_CommandSub '$('>
              spids: [449 463]
            )
            ('\n')
            ('data <<EOF\n')
            ('prefix of note for third commit\n')
            ('EOF\n')
            ('\n')
            ('M 644 inline ')
            (word_part.CommandSubPart
              command_list: 
                (command.CommandList
                  children: [
                    (command.Pipeline
                      children: [
                        (C {(echo)} {(DQ ($ VSub_Name '$commit4'))})
                        (C {(sed)} {(DQ ('s|^..|&/|'))})
                      ]
                      negated: F
                    )
                  ]
                )
              left_token: <Left_CommandSub '$('>
              spids: [470 484]
            )
            ('\n')
            ('data <<EOF\n')
            ('prefix of note for fourth commit\n')
            ('EOF\n')
            ('\n')
            ('M 644 inline ')
            (word_part.CommandSubPart
              command_list: 
                (command.CommandList
                  children: [
                    (command.Pipeline
                      children: [
                        (C {(echo)} {(DQ ($ VSub_Name '$commit4'))})
                        (C {(sed)} 
                          {
                            (DQ ('s|^') (Lit_Other '\\') ('(..') (Lit_Other '\\') (')') (Lit_Other '\\') 
                              ('(..') (Lit_Other '\\') (')|') (Lit_Other '\\') (1/) (Lit_Other '\\') ('2/|')
                            )
                          }
                        )
                      ]
                      negated: F
                    )
                  ]
                )
              left_token: <Left_CommandSub '$('>
              spids: [491 517]
            )
            ('\n')
            ('data <<EOF\n')
            ('pre-prefix of note for fourth commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit1')
            ('\n')
            ('data <<EOF\n')
            ('third note for first commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit2')
            ('\n')
            ('data <<EOF\n')
            ('third note for second commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit3')
            ('\n')
            ('data <<EOF\n')
            ('third note for third commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit4')
            ('\n')
            ('data <<EOF\n')
            ('third note for fourth commit\n')
            ('EOF\n')
            ('\n')
            ('\n')
          ]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:whitespace spids:[555])
          op: Equal
          rhs: {(DQ ('    '))}
          spids: [555]
        )
      ]
      spids: [555]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EXPECT_END)}
          here_end_span_id: 587
          stdin_parts: [
            ('    fourth commit\n')
            ('    pre-prefix of note for fourth commit\n')
            ($ VSub_Name '$whitespace')
            ('\n')
            ('    prefix of note for fourth commit\n')
            ($ VSub_Name '$whitespace')
            ('\n')
            ('    third note for fourth commit\n')
            ('    third commit\n')
            ('    prefix of note for third commit\n')
            ($ VSub_Name '$whitespace')
            ('\n')
            ('    third note for third commit\n')
            ('    second commit\n')
            ('    third note for second commit\n')
            ('    first commit\n')
            ('    third note for first commit\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'add concatentation notes with M command'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/test git log | grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 631
          stdin_parts: [
            ('commit refs/notes/test\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('fifth notes commit\n')
            ('COMMIT\n')
            ('\n')
            ('from refs/notes/test^0\n')
            ('deleteall\n')
            ('\n')
          ]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EXPECT_END)}
          here_end_span_id: 646
          stdin_parts: [
            ('    fourth commit\n')
            ('    third commit\n')
            ('    second commit\n')
            ('    first commit\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'verify that deleteall also removes notes'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/test git log | grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 716
          stdin_parts: [
            ('commit refs/notes/test\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('sixth notes commit\n')
            ('COMMIT\n')
            ('\n')
            ('from refs/notes/test^0\n')
            ('M 644 inline ')
            ($ VSub_Name '$commit1')
            ('\n')
            ('data <<EOF\n')
            ('third note for first commit\n')
            ('EOF\n')
            ('\n')
            ('M 644 inline ')
            ($ VSub_Name '$commit3')
            ('\n')
            ('data <<EOF\n')
            ('third note for third commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit1')
            ('\n')
            ('data <<EOF\n')
            ('fourth note for first commit\n')
            ('EOF\n')
            ('\n')
            ('N inline ')
            ($ VSub_Name '$commit3')
            ('\n')
            ('data <<EOF\n')
            ('fourth note for third commit\n')
            ('EOF\n')
            ('\n')
          ]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EXPECT_END)}
          here_end_span_id: 733
          stdin_parts: [
            ('    fourth commit\n')
            ('    third commit\n')
            ('    fourth note for third commit\n')
            ('    second commit\n')
            ('    first commit\n')
            ('    fourth note for first commit\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'verify that later N commands override earlier M commands'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/test git log | grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (command.FuncDef
      name: fast_import_commits
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_ref spids:[762])
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [762]
                )
              ]
              spids: [762]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_num_commits spids:[766])
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [766]
                )
              ]
              spids: [766]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_append_to_file spids:[770])
                  op: Equal
                  rhs: {($ VSub_Number '$3')}
                  spids: [770]
                )
              ]
              spids: [770]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_i spids:[774])
                  op: Equal
                  rhs: {(0)}
                  spids: [774]
                )
              ]
              spids: [774]
            )
            (command.WhileUntil
              keyword: <KW_While while>
              cond: [(C {(test)} {($ VSub_Name '$my_i')} {(-lt)} {($ VSub_Name '$my_num_commits')})]
              body: 
                (command.DoGroup
                  children: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:my_i spids:[792])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArithSubPart
                                anode: 
                                  (arith_expr.ArithBinary
                                    op_id: Arith_Plus
                                    left: (arith_expr.ArithWord w:{($ VSub_Name '$my_i')})
                                    right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [793 800]
                              )
                            }
                          spids: [792]
                        )
                      ]
                      spids: [792]
                    )
                    (C {(test_tick)})
                    (command.SimpleCommand
                      words: [{(cat)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(DQ ($ VSub_Name '$my_append_to_file'))}
                        )
                        (redir.HereDoc
                          op: <Redir_DLess '<<'>
                          fd: 16777215
                          here_begin: {(INPUT_END)}
                          here_end_span_id: 843
                          stdin_parts: [
                            ('commit ')
                            ($ VSub_Name '$my_ref')
                            ('\n')
                            ('mark :')
                            ($ VSub_Name '$my_i')
                            ('\n')
                            ('committer ')
                            ($ VSub_Name '$GIT_COMMITTER_NAME')
                            (' <')
                            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
                            ('> ')
                            ($ VSub_Name '$GIT_COMMITTER_DATE')
                            ('\n')
                            ('data <<COMMIT\n')
                            ('commit #')
                            ($ VSub_Name '$my_i')
                            ('\n')
                            ('COMMIT\n')
                            ('\n')
                            ('M 644 inline file\n')
                            ('data <<EOF\n')
                            ('file contents in commit #')
                            ($ VSub_Name '$my_i')
                            ('\n')
                            ('EOF\n')
                            ('\n')
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [789 845]
                )
            )
          ]
          spids: [759]
        )
      spids: [754 758]
    )
    (command.FuncDef
      name: fast_import_notes
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_notes_ref spids:[864])
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [864]
                )
              ]
              spids: [864]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_num_commits spids:[868])
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [868]
                )
              ]
              spids: [868]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_append_to_file spids:[872])
                  op: Equal
                  rhs: {($ VSub_Number '$3')}
                  spids: [872]
                )
              ]
              spids: [872]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_note_append spids:[876])
                  op: Equal
                  rhs: {($ VSub_Number '$4')}
                  spids: [876]
                )
              ]
              spids: [876]
            )
            (C {(test_tick)})
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_DGreat '>>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$my_append_to_file'))}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(INPUT_END)}
                  here_end_span_id: 910
                  stdin_parts: [
                    ('commit ')
                    ($ VSub_Name '$my_notes_ref')
                    ('\n')
                    ('committer ')
                    ($ VSub_Name '$GIT_COMMITTER_NAME')
                    (' <')
                    ($ VSub_Name '$GIT_COMMITTER_EMAIL')
                    ('> ')
                    ($ VSub_Name '$GIT_COMMITTER_DATE')
                    ('\n')
                    ('data <<COMMIT\n')
                    ('committing ')
                    ($ VSub_Name '$my_num_commits')
                    (' notes\n')
                    ('COMMIT\n')
                    ('\n')
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:my_i spids:[913])
                  op: Equal
                  rhs: {(0)}
                  spids: [913]
                )
              ]
              spids: [913]
            )
            (command.WhileUntil
              keyword: <KW_While while>
              cond: [(C {(test)} {($ VSub_Name '$my_i')} {(-lt)} {($ VSub_Name '$my_num_commits')})]
              body: 
                (command.DoGroup
                  children: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:my_i spids:[931])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArithSubPart
                                anode: 
                                  (arith_expr.ArithBinary
                                    op_id: Arith_Plus
                                    left: (arith_expr.ArithWord w:{($ VSub_Name '$my_i')})
                                    right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [932 939]
                              )
                            }
                          spids: [931]
                        )
                      ]
                      spids: [931]
                    )
                    (command.SimpleCommand
                      words: [{(cat)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(DQ ($ VSub_Name '$my_append_to_file'))}
                        )
                        (redir.HereDoc
                          op: <Redir_DLess '<<'>
                          fd: 16777215
                          here_begin: {(INPUT_END)}
                          here_end_span_id: 963
                          stdin_parts: [
                            ('N inline :')
                            ($ VSub_Name '$my_i')
                            ('\n')
                            ('data <<EOF\n')
                            ('note for commit #')
                            ($ VSub_Name '$my_i')
                            ($ VSub_Name '$my_note_append')
                            ('\n')
                            ('EOF\n')
                            ('\n')
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [928 965]
                )
            )
          ]
          spids: [861]
        )
      spids: [856 860]
    )
    (C {(rm)} {(input)} {(expect)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:num_commits spids:[977])
          op: Equal
          rhs: {(400)}
          spids: [977]
        )
      ]
      spids: [977]
    )
    (C {(fast_import_commits)} {(DQ (refs/heads/many_commits))} {($ VSub_Name '$num_commits')} {(input)})
    (C {(fast_import_notes)} {(DQ (refs/notes/many_notes))} {($ VSub_Name '$num_commits')} {(input)})
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 1047
          stdin_parts: [
            ('commit refs/notes/many_notes\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('committing some non-notes to the notes tree\n')
            ('COMMIT\n')
            ('\n')
            ('M 755 inline foobar/non-note.txt\n')
            ('data <<EOF\n')
            ('This is not a note, but rather a regular file residing in a notes tree\n')
            ('EOF\n')
            ('\n')
            ('M 644 inline deadbeef\n')
            ('data <<EOF\n')
            ('Non-note file\n')
            ('EOF\n')
            ('\n')
            ('M 644 inline de/adbeef\n')
            ('data <<EOF\n')
            ('Another non-note file\n')
            ('EOF\n')
            ('\n')
          ]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:i spids:[1051])
          op: Equal
          rhs: {($ VSub_Name '$num_commits')}
          spids: [1051]
        )
      ]
      spids: [1051]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Name '$i')} {(-gt)} {(0)})]
      body: 
        (command.DoGroup
          children: [
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EXPECT_END)}
                  here_end_span_id: 1082
                  stdin_parts: [
                    ('    commit #')
                    ($ VSub_Name '$i')
                    ('\n')
                    ('    note for commit #')
                    ($ VSub_Name '$i')
                    ('\n')
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:i spids:[1084])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Minus
                            left: (arith_expr.ArithWord w:{($ VSub_Name '$i')})
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [1085 1092]
                      )
                    }
                  spids: [1084]
                )
              ]
              spids: [1084]
            )
          ]
          spids: [1064 1094]
        )
    )
    (C {(test_expect_success)} {(SQ <'add lots of commits and notes'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/many_notes git log refs/heads/many_commits |\n'> <'\t    grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'verify that lots of notes trigger a fanout scheme'>)} 
      {
        (SQ <'\n'> <'\n'> 
          <'\t# None of the entries in the top-level notes tree should be a full SHA1\n'> <'\tgit ls-tree --name-only refs/notes/many_notes |\n'> <'\twhile read path\n'> <'\tdo\n'> 
          <'\t\tif test $(expr length "$path") -ge 40\n'> <'\t\tthen\n'> <'\t\t\treturn 1\n'> <'\t\tfi\n'> <'\tdone\n'> <'\n'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect_non-note1)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 1147
          stdin_parts: [('This is not a note, but rather a regular file residing in a notes tree\n')]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect_non-note2)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 1160
          stdin_parts: [('Non-note file\n')]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect_non-note3)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 1173
          stdin_parts: [('Another non-note file\n')]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'verify that non-notes are untouched by a fanout change'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit cat-file -p refs/notes/many_notes:foobar/non-note.txt > actual &&\n'> 
          <'\ttest_cmp expect_non-note1 actual &&\n'> <'\tgit cat-file -p refs/notes/many_notes:deadbeef > actual &&\n'> 
          <'\ttest_cmp expect_non-note2 actual &&\n'> <'\tgit cat-file -p refs/notes/many_notes:de/adbeef > actual &&\n'> 
          <'\ttest_cmp expect_non-note3 actual\n'> <'\n'>
        )
      }
    )
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 1220
          stdin_parts: [
            ('commit refs/notes/many_notes\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('changing notes for the top three commits\n')
            ('COMMIT\n')
            ('from refs/notes/many_notes^0\n')
          ]
        )
      ]
    )
    (C {(rm)} {(expect)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:i spids:[1226])
          op: Equal
          rhs: {($ VSub_Name '$num_commits')}
          spids: [1226]
        )
      ]
      spids: [1226]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:j spids:[1229])
          op: Equal
          rhs: {(0)}
          spids: [1229]
        )
      ]
      spids: [1229]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Name '$j')} {(-lt)} {(3)})]
      body: 
        (command.DoGroup
          children: [
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(input)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(INPUT_END)}
                  here_end_span_id: 1262
                  stdin_parts: [
                    ('N inline refs/heads/many_commits~')
                    ($ VSub_Name '$j')
                    ('\n')
                    ('data <<EOF\n')
                    ('changed note for commit #')
                    ($ VSub_Name '$i')
                    ('\n')
                    ('EOF\n')
                  ]
                )
              ]
            )
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EXPECT_END)}
                  here_end_span_id: 1279
                  stdin_parts: [
                    ('    commit #')
                    ($ VSub_Name '$i')
                    ('\n')
                    ('    changed note for commit #')
                    ($ VSub_Name '$i')
                    ('\n')
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:i spids:[1281])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Minus
                            left: (arith_expr.ArithWord w:{($ VSub_Name '$i')})
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [1282 1289]
                      )
                    }
                  spids: [1281]
                )
              ]
              spids: [1281]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:j spids:[1292])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Plus
                            left: (arith_expr.ArithWord w:{($ VSub_Name '$j')})
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [1293 1300]
                      )
                    }
                  spids: [1292]
                )
              ]
              spids: [1292]
            )
          ]
          spids: [1242 1302]
        )
    )
    (C {(test_expect_success)} {(SQ <'change a few existing notes'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/many_notes git log -n3 refs/heads/many_commits |\n'> <'\t    grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'verify that changing notes respect existing fanout'>)} 
      {
        (SQ <'\n'> <'\n'> 
          <'\t# None of the entries in the top-level notes tree should be a full SHA1\n'> <'\tgit ls-tree --name-only refs/notes/many_notes |\n'> <'\twhile read path\n'> <'\tdo\n'> 
          <'\t\tif test $(expr length "$path") -ge 40\n'> <'\t\tthen\n'> <'\t\t\treturn 1\n'> <'\t\tfi\n'> <'\tdone\n'> <'\n'>
        )
      }
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:remaining_notes spids:[1344])
          op: Equal
          rhs: {(10)}
          spids: [1344]
        )
      ]
      spids: [1344]
    )
    (C {(test_tick)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(input)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(INPUT_END)}
          here_end_span_id: 1372
          stdin_parts: [
            ('commit refs/notes/many_notes\n')
            ('committer ')
            ($ VSub_Name '$GIT_COMMITTER_NAME')
            (' <')
            ($ VSub_Name '$GIT_COMMITTER_EMAIL')
            ('> ')
            ($ VSub_Name '$GIT_COMMITTER_DATE')
            ('\n')
            ('data <<COMMIT\n')
            ('removing all notes but ')
            ($ VSub_Name '$remaining_notes')
            ('\n')
            ('COMMIT\n')
            ('from refs/notes/many_notes^0\n')
          ]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:i spids:[1374])
          op: Equal
          rhs: 
            {
              (word_part.ArithSubPart
                anode: 
                  (arith_expr.ArithBinary
                    op_id: Arith_Minus
                    left: (arith_expr.ArithWord w:{($ VSub_Name '$num_commits')})
                    right: (arith_expr.ArithWord w:{($ VSub_Name '$remaining_notes')})
                  )
                spids: [1375 1382]
              )
            }
          spids: [1374]
        )
      ]
      spids: [1374]
    )
    (command.ForEach
      iter_name: sha1
      iter_words: [
        {
          (word_part.CommandSubPart
            command_list: 
              (command.CommandList
                children: [
                  (C {(git)} {(rev-list)} {(-n)} {($ VSub_Name '$i')} {(refs/heads/many_commits)})
                ]
              )
            left_token: <Left_CommandSub '$('>
            spids: [1390 1400]
          )
        }
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(input)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(INPUT_END)}
                  here_end_span_id: 1417
                  stdin_parts: [
                    ('N 0000000000000000000000000000000000000000 ')
                    ($ VSub_Name '$sha1')
                    ('\n')
                  ]
                )
              ]
            )
          ]
          spids: [1402 1418]
        )
      spids: [1389 16777215]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:i spids:[1421])
          op: Equal
          rhs: {($ VSub_Name '$num_commits')}
          spids: [1421]
        )
      ]
      spids: [1421]
    )
    (C {(rm)} {(expect)})
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Name '$i')} {(-gt)} {(0)})]
      body: 
        (command.DoGroup
          children: [
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EXPECT_END)}
                  here_end_span_id: 1453
                  stdin_parts: [('    commit #') ($ VSub_Name '$i') ('\n')]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ VSub_Name '$i')} {(-le)} {($ VSub_Name '$remaining_notes')})]
                  action: [
                    (command.SimpleCommand
                      words: [{(cat)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(expect)}
                        )
                        (redir.HereDoc
                          op: <Redir_DLess '<<'>
                          fd: 16777215
                          here_begin: {(EXPECT_END)}
                          here_end_span_id: 1481
                          stdin_parts: [('    note for commit #') ($ VSub_Name '$i') ('\n')]
                        )
                      ]
                    )
                  ]
                  spids: [16777215 1466]
                )
              ]
              spids: [16777215 1483]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:i spids:[1486])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Minus
                            left: (arith_expr.ArithWord w:{($ VSub_Name '$i')})
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [1487 1494]
                      )
                    }
                  spids: [1486]
                )
              ]
              spids: [1486]
            )
          ]
          spids: [1438 1496]
        )
    )
    (C {(test_expect_success)} {(SQ <'remove lots of notes'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/many_notes git log refs/heads/many_commits |\n'> <'\t    grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'verify that removing notes trigger fanout consolidation'>)} 
      {
        (SQ <'\n'> <'\n'> <'\t# All entries in the top-level notes tree should be a full SHA1\n'> 
          <'\tgit ls-tree --name-only -r refs/notes/many_notes |\n'> <'\twhile read path\n'> <'\tdo\n'> <'\t\t# Explicitly ignore the non-note paths\n'> 
          <'\t\ttest "$path" = "foobar/non-note.txt" && continue\n'> <'\t\ttest "$path" = "deadbeef" && continue\n'> <'\t\ttest "$path" = "de/adbeef" && continue\n'> <'\n'> 
          <'\t\tif test $(expr length "$path") -ne 40\n'> <'\t\tthen\n'> <'\t\t\treturn 1\n'> <'\t\tfi\n'> <'\tdone\n'> <'\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'verify that non-notes are untouched by a fanout change'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit cat-file -p refs/notes/many_notes:foobar/non-note.txt > actual &&\n'> 
          <'\ttest_cmp expect_non-note1 actual &&\n'> <'\tgit cat-file -p refs/notes/many_notes:deadbeef > actual &&\n'> 
          <'\ttest_cmp expect_non-note2 actual &&\n'> <'\tgit cat-file -p refs/notes/many_notes:de/adbeef > actual &&\n'> 
          <'\ttest_cmp expect_non-note3 actual\n'> <'\n'>
        )
      }
    )
    (C {(rm)} {(input)} {(expect)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:num_notes_refs spids:[1569])
          op: Equal
          rhs: {(10)}
          spids: [1569]
        )
      ]
      spids: [1569]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:num_commits spids:[1572])
          op: Equal
          rhs: {(16)}
          spids: [1572]
        )
      ]
      spids: [1572]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:some_commits spids:[1575])
          op: Equal
          rhs: {(8)}
          spids: [1575]
        )
      ]
      spids: [1575]
    )
    (C {(fast_import_commits)} {(DQ (refs/heads/more_commits))} {($ VSub_Name '$num_commits')} {(input)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:i spids:[1594])
          op: Equal
          rhs: {(0)}
          spids: [1594]
        )
      ]
      spids: [1594]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Name '$i')} {(-lt)} {($ VSub_Name '$num_notes_refs')})]
      body: 
        (command.DoGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:i spids:[1610])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Plus
                            left: (arith_expr.ArithWord w:{($ VSub_Name '$i')})
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [1611 1618]
                      )
                    }
                  spids: [1610]
                )
              ]
              spids: [1610]
            )
            (C {(fast_import_notes)} {(DQ (refs/notes/more_notes_) ($ VSub_Name '$i'))} 
              {($ VSub_Name '$num_commits')} {(input)}
            )
          ]
          spids: [1607 1632]
        )
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:i spids:[1637])
          op: Equal
          rhs: {(0)}
          spids: [1637]
        )
      ]
      spids: [1637]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Name '$i')} {(-lt)} {($ VSub_Name '$num_notes_refs')})]
      body: 
        (command.DoGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:i spids:[1653])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Plus
                            left: (arith_expr.ArithWord w:{($ VSub_Name '$i')})
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [1654 1661]
                      )
                    }
                  spids: [1653]
                )
              ]
              spids: [1653]
            )
            (C {(fast_import_notes)} {(DQ (refs/notes/more_notes_) ($ VSub_Name '$i'))} 
              {($ VSub_Name '$some_commits')} {(input)} {(DQ (' (2)'))}
            )
          ]
          spids: [1650 1679]
        )
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:i spids:[1684])
          op: Equal
          rhs: {($ VSub_Name '$num_commits')}
          spids: [1684]
        )
      ]
      spids: [1684]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Name '$i')} {(-gt)} {(0)})]
      body: 
        (command.DoGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:note_data spids:[1700])
                  op: Equal
                  rhs: {(DQ ('note for commit #') ($ VSub_Name '$i'))}
                  spids: [1700]
                )
              ]
              spids: [1700]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ VSub_Name '$i')} {(-le)} {($ VSub_Name '$some_commits')})]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:note_data spids:[1721])
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$note_data') (' (2)'))}
                          spids: [1721]
                        )
                      ]
                      spids: [1721]
                    )
                  ]
                  spids: [16777215 1718]
                )
              ]
              spids: [16777215 1728]
            )
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(expect)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EXPECT_END)}
                  here_end_span_id: 1746
                  stdin_parts: [
                    ('    commit #')
                    ($ VSub_Name '$i')
                    ('\n')
                    ('    ')
                    ($ VSub_Name '$note_data')
                    ('\n')
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:i spids:[1748])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Minus
                            left: (arith_expr.ArithWord w:{($ VSub_Name '$i')})
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [1749 1756]
                      )
                    }
                  spids: [1748]
                )
              ]
              spids: [1748]
            )
          ]
          spids: [1697 1758]
        )
    )
    (C {(test_expect_success)} 
      {
        (DQ ('add notes to ') ($ VSub_Name '$num_commits') (' commits in each of ') 
          ($ VSub_Name '$num_notes_refs') (' refs')
        )
      } 
      {
        (SQ <'\n'> <'\n'> <'\tgit fast-import --active-branches=5 <input &&\n'> 
          <'\tGIT_NOTES_REF=refs/notes/more_notes_1 git log refs/heads/more_commits |\n'> <'\t    grep "^    " > actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)