(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <"Test git notes prune">)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (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">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[47])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("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")
              )
            }
          do_expansion: True
          here_end: END_OF_LOG
          was_filled: True
          spids: [51]
        )
      ]
    )
    (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">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[158])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {(DQ ("5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29\n"))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [162]
        )
      ]
    )
    (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">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[228])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {(DQ ("08341ad9e94faa089d60fd3f523affb25c6da189\n"))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [232]
        )
      ]
    )
    (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)})
  ]
)