(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'Test merging of notes trees'>)}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ <'\n'> <'\ttest_commit 1st &&\n'> <'\ttest_commit 2nd &&\n'> <'\ttest_commit 3rd &&\n'> 
          <'\ttest_commit 4th &&\n'> <'\ttest_commit 5th &&\n'> <'\t# Create notes on 4 first commits\n'> 
          <'\tgit config core.notesRef refs/notes/x &&\n'> <'\tgit notes add -m "Notes on 1st commit" 1st &&\n'> 
          <'\tgit notes add -m "Notes on 2nd commit" 2nd &&\n'> <'\tgit notes add -m "Notes on 3rd commit" 3rd &&\n'> 
          <'\tgit notes add -m "Notes on 4th commit" 4th &&\n'> <'\t# Copy notes to remote-notes\n'> <'\tgit fetch . refs/notes/*:refs/remote-notes/origin/*\n'>
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:commit_sha1)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(git)} {(rev-parse)} 
                        {(1st) (Lit_Other '^') (Lit_LBrace '{') (commit) (Lit_RBrace '}')}
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [47 57]
              )
            }
          spids: [46]
        )
      ]
      spids: [46]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:commit_sha2)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(git)} {(rev-parse)} 
                        {(2nd) (Lit_Other '^') (Lit_LBrace '{') (commit) (Lit_RBrace '}')}
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [60 70]
              )
            }
          spids: [59]
        )
      ]
      spids: [59]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:commit_sha3)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(git)} {(rev-parse)} 
                        {(3rd) (Lit_Other '^') (Lit_LBrace '{') (commit) (Lit_RBrace '}')}
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [73 83]
              )
            }
          spids: [72]
        )
      ]
      spids: [72]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:commit_sha4)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(git)} {(rev-parse)} 
                        {(4th) (Lit_Other '^') (Lit_LBrace '{') (commit) (Lit_RBrace '}')}
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [86 96]
              )
            }
          spids: [85]
        )
      ]
      spids: [85]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:commit_sha5)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(git)} {(rev-parse)} 
                        {(5th) (Lit_Other '^') (Lit_LBrace '{') (commit) (Lit_RBrace '}')}
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [99 109]
              )
            }
          spids: [98]
        )
      ]
      spids: [98]
    )
    (FuncDef
      name: verify_notes
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:notes_ref)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$1'))}
                  spids: [120]
                )
              ]
              spids: [120]
            )
            (AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (Pipeline
                  children: [
                    (C {(git)} {(-c)} 
                      {(core.notesRef) (Lit_Other '=') (DQ (refs/notes/) ($ VSub_Name '$notes_ref'))} {(notes)}
                    )
                    (SimpleCommand
                      words: [{(sort)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ (output_notes_) ($ VSub_Name '$notes_ref'))}
                          spids: [144]
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(test_cmp)} {(DQ (expect_notes_) ($ VSub_Name '$notes_ref'))} 
                  {(DQ (output_notes_) ($ VSub_Name '$notes_ref'))}
                )
                (SimpleCommand
                  words: [
                    {(git)}
                    {(-c)}
                    {(core.notesRef) (Lit_Other '=') (DQ (refs/notes/) ($ VSub_Name '$notes_ref'))}
                    {(log)}
                    {(--format) (Lit_Other '=') (DQ ('%H %s%n%N'))}
                  ]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 16777215
                      arg_word: {(DQ (output_log_) ($ VSub_Name '$notes_ref'))}
                      spids: [189]
                    )
                  ]
                )
                (C {(test_cmp)} {(DQ (expect_log_) ($ VSub_Name '$notes_ref'))} 
                  {(DQ (output_log_) ($ VSub_Name '$notes_ref'))}
                )
              ]
            )
          ]
          spids: [117]
        )
      spids: [112 116]
    )
    (Pipeline
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (HereDoc
              op_id: Redir_DLess
              fd: 16777215
              body: 
                {
                  (DQ ('5e93d24084d32e1cb61f7070505b9d2530cca987 ') ($ VSub_Name '$commit_sha4') ('\n') 
                    ('8366731eeee53787d2bdf8fc1eff7d94757e8da0 ') ($ VSub_Name '$commit_sha3') ('\n') ('eede89064cd42441590d6afec6c37b321ada3389 ') 
                    ($ VSub_Name '$commit_sha2') ('\n') ('daa55ffad6cb99bf64226532147ffcaf5ce8bdd1 ') ($ VSub_Name '$commit_sha1') ('\n')
                  )
                }
              do_expansion: True
              here_end: EOF
              was_filled: T
              spids: [215]
            )
          ]
        )
        (SimpleCommand
          words: [{(sort)}]
          redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_notes_x)} spids:[222])]
        )
      ]
      negated: F
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_log_x)} spids:[241])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {
              (DQ ($ VSub_Name '$commit_sha5') (' 5th\n') ('\n') ($ VSub_Name '$commit_sha4') (' 4th\n') 
                ('Notes on 4th commit\n') ('\n') ($ VSub_Name '$commit_sha3') (' 3rd\n') ('Notes on 3rd commit\n') ('\n') 
                ($ VSub_Name '$commit_sha2') (' 2nd\n') ('Notes on 2nd commit\n') ('\n') ($ VSub_Name '$commit_sha1') (' 1st\n') 
                ('Notes on 1st commit\n') ('\n')
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: T
          spids: [244]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'verify initial notes (x)'>)} {(SQ <'\n'> <'\tverify_notes x\n'>)})
    (C {(cp)} {(expect_notes_x)} {(expect_notes_y)})
    (C {(cp)} {(expect_notes_x)} {(expect_notes_v)})
    (C {(cp)} {(expect_log_x)} {(expect_log_y)})
    (C {(cp)} {(expect_log_x)} {(expect_log_v)})
    (C {(test_expect_success)} {(SQ <'fail to merge empty notes ref into empty notes ref (z => y)'>)} 
      {(SQ <'\n'> <'\ttest_must_fail git -c "core.notesRef=refs/notes/y" notes merge z\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'fail to merge into various non-notes refs'>)} 
      {
        (SQ <'\n'> <'\ttest_must_fail git -c "core.notesRef=refs/notes" notes merge x &&\n'> 
          <'\ttest_must_fail git -c "core.notesRef=refs/notes/" notes merge x &&\n'> <'\tmkdir -p .git/refs/notes/dir &&\n'> 
          <'\ttest_must_fail git -c "core.notesRef=refs/notes/dir" notes merge x &&\n'> <'\ttest_must_fail git -c "core.notesRef=refs/notes/dir/" notes merge x &&\n'> 
          <'\ttest_must_fail git -c "core.notesRef=refs/heads/master" notes merge x &&\n'> <'\ttest_must_fail git -c "core.notesRef=refs/notes/y:" notes merge x &&\n'> 
          <'\ttest_must_fail git -c "core.notesRef=refs/notes/y:foo" notes merge x &&\n'> <'\ttest_must_fail git -c "core.notesRef=refs/notes/foo^{bar" notes merge x\n'>
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ <'merge non-notes ref into empty notes ref (remote-notes/origin/x => v)'>)} 
      {
        (SQ <'\n'> <'\tgit config core.notesRef refs/notes/v &&\n'> 
          <'\tgit notes merge refs/remote-notes/origin/x &&\n'> <'\tverify_notes v &&\n'> 
          <'\t# refs/remote-notes/origin/x and v should point to the same notes commit\n'> <'\ttest "$(git rev-parse refs/remote-notes/origin/x)" = "$(git rev-parse refs/notes/v)"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'merge notes into empty notes ref (x => y)'>)} 
      {
        (SQ <'\n'> <'\tgit config core.notesRef refs/notes/y &&\n'> <'\tgit notes merge x &&\n'> 
          <'\tverify_notes y &&\n'> <'\t# x and y should point to the same notes commit\n'> 
          <'\ttest "$(git rev-parse refs/notes/x)" = "$(git rev-parse refs/notes/y)"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'merge empty notes ref (z => y)'>)} 
      {
        (SQ <'\n'> <'\tgit notes merge z &&\n'> <'\t# y should not change (still == x)\n'> 
          <'\ttest "$(git rev-parse refs/notes/x)" = "$(git rev-parse refs/notes/y)"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'change notes on other notes ref (y)'>)} 
      {
        (SQ <'\n'> <'\t# Not touching notes to 1st commit\n'> <'\tgit notes remove 2nd &&\n'> 
          <'\tgit notes append -m "More notes on 3rd commit" 3rd &&\n'> <'\tgit notes add -f -m "New notes on 4th commit" 4th &&\n'> 
          <'\tgit notes add -m "Notes on 5th commit" 5th\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'merge previous notes commit (y^ => y) => No-op'>)} 
      {
        (SQ <'\n'> <'\tpre_state="$(git rev-parse refs/notes/y)" &&\n'> <'\tgit notes merge y^ &&\n'> 
          <'\t# y should not move\n'> <'\ttest "$pre_state" = "$(git rev-parse refs/notes/y)"\n'>
        )
      }
    )
    (Pipeline
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (HereDoc
              op_id: Redir_DLess
              fd: 16777215
              body: 
                {
                  (DQ ('0f2efbd00262f2fd41dfae33df8765618eeacd99 ') ($ VSub_Name '$commit_sha5') ('\n') 
                    ('dec2502dac3ea161543f71930044deff93fa945c ') ($ VSub_Name '$commit_sha4') ('\n') ('4069cdb399fd45463ec6eef8e051a16a03592d91 ') 
                    ($ VSub_Name '$commit_sha3') ('\n') ('daa55ffad6cb99bf64226532147ffcaf5ce8bdd1 ') ($ VSub_Name '$commit_sha1') ('\n')
                  )
                }
              do_expansion: True
              here_end: EOF
              was_filled: T
              spids: [416]
            )
          ]
        )
        (SimpleCommand
          words: [{(sort)}]
          redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_notes_y)} spids:[423])]
        )
      ]
      negated: F
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_log_y)} spids:[442])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {
              (DQ ($ VSub_Name '$commit_sha5') (' 5th\n') ('Notes on 5th commit\n') ('\n') 
                ($ VSub_Name '$commit_sha4') (' 4th\n') ('New notes on 4th commit\n') ('\n') ($ VSub_Name '$commit_sha3') (' 3rd\n') 
                ('Notes on 3rd commit\n') ('\n') ('More notes on 3rd commit\n') ('\n') ($ VSub_Name '$commit_sha2') (' 2nd\n') ('\n') 
                ($ VSub_Name '$commit_sha1') (' 1st\n') ('Notes on 1st commit\n') ('\n')
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: T
          spids: [445]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'verify changed notes on other notes ref (y)'>)} 
      {(SQ <'\n'> <'\tverify_notes y\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'verify unchanged notes on original notes ref (x)'>)} 
      {(SQ <'\n'> <'\tverify_notes x\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'merge original notes (x) into changed notes (y) => No-op'>)} 
      {
        (SQ <'\n'> <'\tgit notes merge -vvv x &&\n'> <'\tverify_notes y &&\n'> <'\tverify_notes x\n'>)
      }
    )
    (C {(cp)} {(expect_notes_y)} {(expect_notes_x)})
    (C {(cp)} {(expect_log_y)} {(expect_log_x)})
    (C {(test_expect_success)} {(SQ <'merge changed (y) into original (x) => Fast-forward'>)} 
      {
        (SQ <'\n'> <'\tgit config core.notesRef refs/notes/x &&\n'> <'\tgit notes merge y &&\n'> 
          <'\tverify_notes x &&\n'> <'\tverify_notes y &&\n'> <'\t# x and y should point to same the notes commit\n'> 
          <'\ttest "$(git rev-parse refs/notes/x)" = "$(git rev-parse refs/notes/y)"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'merge empty notes ref (z => y)'>)} 
      {
        (SQ <'\n'> <'\t# Prepare empty (but valid) notes ref (z)\n'> 
          <'\tgit config core.notesRef refs/notes/z &&\n'> <'\tgit notes add -m "foo" &&\n'> <'\tgit notes remove &&\n'> <'\tgit notes >output_notes_z &&\n'> 
          <'\ttest_cmp /dev/null output_notes_z &&\n'> <'\t# Do the merge (z => y)\n'> <'\tgit config core.notesRef refs/notes/y &&\n'> 
          <'\tgit notes merge z &&\n'> <'\tverify_notes y &&\n'> <'\t# y should no longer point to the same notes commit as x\n'> 
          <'\ttest "$(git rev-parse refs/notes/x)" != "$(git rev-parse refs/notes/y)"\n'>
        )
      }
    )
    (Pipeline
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (HereDoc
              op_id: Redir_DLess
              fd: 16777215
              body: 
                {
                  (DQ ('0f2efbd00262f2fd41dfae33df8765618eeacd99 ') ($ VSub_Name '$commit_sha5') ('\n') 
                    ('dec2502dac3ea161543f71930044deff93fa945c ') ($ VSub_Name '$commit_sha4') ('\n') ('4069cdb399fd45463ec6eef8e051a16a03592d91 ') 
                    ($ VSub_Name '$commit_sha3') ('\n') ('d000d30e6ddcfce3a8122c403226a2ce2fd04d9d ') ($ VSub_Name '$commit_sha2') ('\n') 
                    ('43add6bd0c8c0bc871ac7991e0f5573cfba27804 ') ($ VSub_Name '$commit_sha1') ('\n')
                  )
                }
              do_expansion: True
              here_end: EOF
              was_filled: T
              spids: [564]
            )
          ]
        )
        (SimpleCommand
          words: [{(sort)}]
          redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_notes_y)} spids:[571])]
        )
      ]
      negated: F
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_log_y)} spids:[593])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {
              (DQ ($ VSub_Name '$commit_sha5') (' 5th\n') ('Notes on 5th commit\n') ('\n') 
                ($ VSub_Name '$commit_sha4') (' 4th\n') ('New notes on 4th commit\n') ('\n') ($ VSub_Name '$commit_sha3') (' 3rd\n') 
                ('Notes on 3rd commit\n') ('\n') ('More notes on 3rd commit\n') ('\n') ($ VSub_Name '$commit_sha2') (' 2nd\n') 
                ('New notes on 2nd commit\n') ('\n') ($ VSub_Name '$commit_sha1') (' 1st\n') ('Notes on 1st commit\n') ('\n') 
                ('More notes on 1st commit\n') ('\n')
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: T
          spids: [596]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'change notes on other notes ref (y)'>)} 
      {
        (SQ <'\n'> <'\t# Append to 1st commit notes\n'> 
          <'\tgit notes append -m "More notes on 1st commit" 1st &&\n'> <'\t# Add new notes to 2nd commit\n'> <'\tgit notes add -m "New notes on 2nd commit" 2nd &&\n'> 
          <'\tverify_notes y\n'>
        )
      }
    )
    (Pipeline
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (HereDoc
              op_id: Redir_DLess
              fd: 16777215
              body: 
                {
                  (DQ ('0f2efbd00262f2fd41dfae33df8765618eeacd99 ') ($ VSub_Name '$commit_sha5') ('\n') 
                    ('1f257a3a90328557c452f0817d6cc50c89d315d4 ') ($ VSub_Name '$commit_sha4') ('\n') ('daa55ffad6cb99bf64226532147ffcaf5ce8bdd1 ') 
                    ($ VSub_Name '$commit_sha1') ('\n')
                  )
                }
              do_expansion: True
              here_end: EOF
              was_filled: T
              spids: [643]
            )
          ]
        )
        (SimpleCommand
          words: [{(sort)}]
          redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_notes_x)} spids:[650])]
        )
      ]
      negated: F
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_log_x)} spids:[666])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {
              (DQ ($ VSub_Name '$commit_sha5') (' 5th\n') ('Notes on 5th commit\n') ('\n') 
                ($ VSub_Name '$commit_sha4') (' 4th\n') ('New notes on 4th commit\n') ('\n') ('More notes on 4th commit\n') ('\n') 
                ($ VSub_Name '$commit_sha3') (' 3rd\n') ('\n') ($ VSub_Name '$commit_sha2') (' 2nd\n') ('\n') ($ VSub_Name '$commit_sha1') (' 1st\n') 
                ('Notes on 1st commit\n') ('\n')
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: T
          spids: [669]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'change notes on notes ref (x)'>)} 
      {
        (SQ <'\n'> <'\tgit config core.notesRef refs/notes/x &&\n'> <'\tgit notes remove 3rd &&\n'> 
          <'\tgit notes append -m "More notes on 4th commit" 4th &&\n'> <'\tverify_notes x\n'>
        )
      }
    )
    (Pipeline
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (HereDoc
              op_id: Redir_DLess
              fd: 16777215
              body: 
                {
                  (DQ ('0f2efbd00262f2fd41dfae33df8765618eeacd99 ') ($ VSub_Name '$commit_sha5') ('\n') 
                    ('1f257a3a90328557c452f0817d6cc50c89d315d4 ') ($ VSub_Name '$commit_sha4') ('\n') ('d000d30e6ddcfce3a8122c403226a2ce2fd04d9d ') 
                    ($ VSub_Name '$commit_sha2') ('\n') ('43add6bd0c8c0bc871ac7991e0f5573cfba27804 ') ($ VSub_Name '$commit_sha1') ('\n')
                  )
                }
              do_expansion: True
              here_end: EOF
              was_filled: T
              spids: [711]
            )
          ]
        )
        (SimpleCommand
          words: [{(sort)}]
          redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_notes_x)} spids:[718])]
        )
      ]
      negated: F
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_log_x)} spids:[737])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {
              (DQ ($ VSub_Name '$commit_sha5') (' 5th\n') ('Notes on 5th commit\n') ('\n') 
                ($ VSub_Name '$commit_sha4') (' 4th\n') ('New notes on 4th commit\n') ('\n') ('More notes on 4th commit\n') ('\n') 
                ($ VSub_Name '$commit_sha3') (' 3rd\n') ('\n') ($ VSub_Name '$commit_sha2') (' 2nd\n') ('New notes on 2nd commit\n') ('\n') 
                ($ VSub_Name '$commit_sha1') (' 1st\n') ('Notes on 1st commit\n') ('\n') ('More notes on 1st commit\n') ('\n')
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: T
          spids: [740]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'merge y into x => Non-conflicting 3-way merge'>)} 
      {(SQ <'\n'> <'\tgit notes merge y &&\n'> <'\tverify_notes x &&\n'> <'\tverify_notes y\n'>)}
    )
    (Pipeline
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (HereDoc
              op_id: Redir_DLess
              fd: 16777215
              body: 
                {
                  (DQ ('05a4927951bcef347f51486575b878b2b60137f2 ') ($ VSub_Name '$commit_sha3') ('\n') 
                    ('d000d30e6ddcfce3a8122c403226a2ce2fd04d9d ') ($ VSub_Name '$commit_sha2') ('\n')
                  )
                }
              do_expansion: True
              here_end: EOF
              was_filled: T
              spids: [784]
            )
          ]
        )
        (SimpleCommand
          words: [{(sort)}]
          redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_notes_w)} spids:[791])]
        )
      ]
      negated: F
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_log_w)} spids:[804])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {
              (DQ ($ VSub_Name '$commit_sha5') (' 5th\n') ('\n') ($ VSub_Name '$commit_sha4') (' 4th\n') 
                ('\n') ($ VSub_Name '$commit_sha3') (' 3rd\n') ('New notes on 3rd commit\n') ('\n') ($ VSub_Name '$commit_sha2') 
                (' 2nd\n') ('New notes on 2nd commit\n') ('\n') ($ VSub_Name '$commit_sha1') (' 1st\n') ('\n')
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: T
          spids: [807]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'create notes on new, separate notes ref (w)'>)} 
      {
        (SQ <'\n'> <'\tgit config core.notesRef refs/notes/w &&\n'> 
          <'\t# Add same note as refs/notes/y on 2nd commit\n'> <'\tgit notes add -m "New notes on 2nd commit" 2nd &&\n'> 
          <'\t# Add new note on 3rd commit (non-conflicting)\n'> <'\tgit notes add -m "New notes on 3rd commit" 3rd &&\n'> 
          <'\t# Verify state of notes on new, separate notes ref (w)\n'> <'\tverify_notes w\n'>
        )
      }
    )
    (Pipeline
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (HereDoc
              op_id: Redir_DLess
              fd: 16777215
              body: 
                {
                  (DQ ('0f2efbd00262f2fd41dfae33df8765618eeacd99 ') ($ VSub_Name '$commit_sha5') ('\n') 
                    ('1f257a3a90328557c452f0817d6cc50c89d315d4 ') ($ VSub_Name '$commit_sha4') ('\n') ('05a4927951bcef347f51486575b878b2b60137f2 ') 
                    ($ VSub_Name '$commit_sha3') ('\n') ('d000d30e6ddcfce3a8122c403226a2ce2fd04d9d ') ($ VSub_Name '$commit_sha2') ('\n') 
                    ('43add6bd0c8c0bc871ac7991e0f5573cfba27804 ') ($ VSub_Name '$commit_sha1') ('\n')
                  )
                }
              do_expansion: True
              here_end: EOF
              was_filled: T
              spids: [849]
            )
          ]
        )
        (SimpleCommand
          words: [{(sort)}]
          redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_notes_x)} spids:[856])]
        )
      ]
      negated: F
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect_log_x)} spids:[878])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {
              (DQ ($ VSub_Name '$commit_sha5') (' 5th\n') ('Notes on 5th commit\n') ('\n') 
                ($ VSub_Name '$commit_sha4') (' 4th\n') ('New notes on 4th commit\n') ('\n') ('More notes on 4th commit\n') ('\n') 
                ($ VSub_Name '$commit_sha3') (' 3rd\n') ('New notes on 3rd commit\n') ('\n') ($ VSub_Name '$commit_sha2') (' 2nd\n') 
                ('New notes on 2nd commit\n') ('\n') ($ VSub_Name '$commit_sha1') (' 1st\n') ('Notes on 1st commit\n') ('\n') 
                ('More notes on 1st commit\n') ('\n')
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: T
          spids: [881]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'merge w into x => Non-conflicting history-less merge'>)} 
      {
        (SQ <'\n'> <'\tgit config core.notesRef refs/notes/x &&\n'> <'\tgit notes merge w &&\n'> 
          <'\t# Verify new state of notes on other notes ref (x)\n'> <'\tverify_notes x &&\n'> <'\t# Also verify that nothing changed on other notes refs (y and w)\n'> 
          <'\tverify_notes y &&\n'> <'\tverify_notes w\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)