(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'Test git notes prune'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(SQ <'setup: create a few commits with notes'>)} 
      {
        (SQ <'\n'> <'\n'> <'\t: > file1 &&\n'> <'\tgit add file1 &&\n'> <'\ttest_tick &&\n'> 
          <'\tgit commit -m 1st &&\n'> <'\tgit notes add -m "Note #1" &&\n'> <'\t: > file2 &&\n'> <'\tgit add file2 &&\n'> <'\ttest_tick &&\n'> 
          <'\tgit commit -m 2nd &&\n'> <'\tgit notes add -m "Note #2" &&\n'> <'\t: > file3 &&\n'> <'\tgit add file3 &&\n'> <'\ttest_tick &&\n'> 
          <'\tgit commit -m 3rd &&\n'> <'\tCOMMIT_FILE=.git/objects/5e/e1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n'> 
          <'\ttest -f $COMMIT_FILE &&\n'> <'\ttest-chmtime =+0 $COMMIT_FILE &&\n'> <'\tgit notes add -m "Note #3"\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: {(END_OF_LOG)}
          here_end_span_id: 81
          stdin_parts: [
            ('commit 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29\n')
            ('Author: A U Thor <author@example.com>\n')
            ('Date:   Thu Apr 7 15:15:13 2005 -0700\n')
            ('\n')
            ('    3rd\n')
            ('\n')
            ('Notes:\n')
            ('    Note #3\n')
            ('\n')
            ('commit 08341ad9e94faa089d60fd3f523affb25c6da189\n')
            ('Author: A U Thor <author@example.com>\n')
            ('Date:   Thu Apr 7 15:14:13 2005 -0700\n')
            ('\n')
            ('    2nd\n')
            ('\n')
            ('Notes:\n')
            ('    Note #2\n')
            ('\n')
            ('commit ab5f302035f2e7aaf04265f08b42034c23256e1f\n')
            ('Author: A U Thor <author@example.com>\n')
            ('Date:   Thu Apr 7 15:13:13 2005 -0700\n')
            ('\n')
            ('    1st\n')
            ('\n')
            ('Notes:\n')
            ('    Note #1\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'verify commits and notes'>)} 
      {(SQ <'\n'> <'\n'> <'\tgit log > actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'remove some commits'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit reset --hard HEAD~1 &&\n'> 
          <'\tgit reflog expire --expire=now HEAD &&\n'> <'\tgit gc --prune=now\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'verify that commits are gone'>)} 
      {
        (SQ <'\n'> <'\n'> 
          <'\ttest_must_fail git cat-file -p 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n'> <'\tgit cat-file -p 08341ad9e94faa089d60fd3f523affb25c6da189 &&\n'> 
          <'\tgit cat-file -p ab5f302035f2e7aaf04265f08b42034c23256e1f\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'verify that notes are still present'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n'> 
          <'\tgit notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&\n'> <'\tgit notes show ab5f302035f2e7aaf04265f08b42034c23256e1f\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'prune -n does not remove notes'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit notes list > expect &&\n'> <'\tgit notes prune -n &&\n'> 
          <'\tgit notes list > actual &&\n'> <'\ttest_cmp expect actual\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: {(EOF)}
          here_end_span_id: 169
          stdin_parts: [('5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29\n')]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'prune -n lists prunable notes'>)} 
      {
        (SQ <'\n'> <'\n'> <'\n'> <'\tgit notes prune -n > actual &&\n'> <'\ttest_cmp expect actual\n'>)
      }
    )
    (C {(test_expect_success)} {(SQ <'prune notes'>)} {(SQ <'\n'> <'\n'> <'\tgit notes prune\n'>)})
    (C {(test_expect_success)} {(SQ <'verify that notes are gone'>)} 
      {
        (SQ <'\n'> <'\n'> 
          <'\ttest_must_fail git notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n'> <'\tgit notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&\n'> 
          <'\tgit notes show ab5f302035f2e7aaf04265f08b42034c23256e1f\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'remove some commits'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit reset --hard HEAD~1 &&\n'> 
          <'\tgit reflog expire --expire=now HEAD &&\n'> <'\tgit gc --prune=now\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: {(EOF)}
          here_end_span_id: 241
          stdin_parts: [('08341ad9e94faa089d60fd3f523affb25c6da189\n')]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'prune -v notes'>)} 
      {(SQ <'\n'> <'\n'> <'\tgit notes prune -v > actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'verify that notes are gone'>)} 
      {
        (SQ <'\n'> <'\n'> 
          <'\ttest_must_fail git notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n'> <'\ttest_must_fail git notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&\n'> 
          <'\tgit notes show ab5f302035f2e7aaf04265f08b42034c23256e1f\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)