(List (= scope=<EAssignScope.GLOBAL 1> flags=0 words=[] bindings=[('test_description', {[SQ <LIT_CHARS "Test git notes prune">]})]) (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "setup: create a few commits with notes">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\t: > file1 &&\n"> <LIT_CHARS "\tgit add file1 &&\n"> <LIT_CHARS "\ttest_tick &&\n"> <LIT_CHARS "\tgit commit -m 1st &&\n"> <LIT_CHARS "\tgit notes add -m \"Note #1\" &&\n"> <LIT_CHARS "\t: > file2 &&\n"> <LIT_CHARS "\tgit add file2 &&\n"> <LIT_CHARS "\ttest_tick &&\n"> <LIT_CHARS "\tgit commit -m 2nd &&\n"> <LIT_CHARS "\tgit notes add -m \"Note #2\" &&\n"> <LIT_CHARS "\t: > file3 &&\n"> <LIT_CHARS "\tgit add file3 &&\n"> <LIT_CHARS "\ttest_tick &&\n"> <LIT_CHARS "\tgit commit -m 3rd &&\n"> <LIT_CHARS "\tCOMMIT_FILE=.git/objects/5e/e1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n"> <LIT_CHARS "\ttest -f $COMMIT_FILE &&\n"> <LIT_CHARS "\ttest-chmtime =+0 $COMMIT_FILE &&\n"> <LIT_CHARS "\tgit notes add -m \"Note #3\"\n">]} ) (Com {[LIT_CHARS cat]} < (FilenameRedirectNode filename={[LIT_CHARS expect]} <REDIR_GREAT ">"> 1), (HereDocRedirectNode here_end='END_OF_LOG' do_expansion=True body_word={[DQ [LIT_CHARS "commit 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29\n"][LIT_CHARS "Author: A U Thor <author@example.com>\n"][LIT_CHARS "Date: Thu Apr 7 15:15:13 2005 -0700\n"][LIT_CHARS "\n"][LIT_CHARS " 3rd\n"][LIT_CHARS "\n"][LIT_CHARS "Notes:\n"][LIT_CHARS " Note #3\n"][LIT_CHARS "\n"][LIT_CHARS "commit 08341ad9e94faa089d60fd3f523affb25c6da189\n"][LIT_CHARS "Author: A U Thor <author@example.com>\n"][LIT_CHARS "Date: Thu Apr 7 15:14:13 2005 -0700\n"][LIT_CHARS "\n"][LIT_CHARS " 2nd\n"][LIT_CHARS "\n"][LIT_CHARS "Notes:\n"][LIT_CHARS " Note #2\n"][LIT_CHARS "\n"][LIT_CHARS "commit ab5f302035f2e7aaf04265f08b42034c23256e1f\n"][LIT_CHARS "Author: A U Thor <author@example.com>\n"][LIT_CHARS "Date: Thu Apr 7 15:13:13 2005 -0700\n"][LIT_CHARS "\n"][LIT_CHARS " 1st\n"][LIT_CHARS "\n"][LIT_CHARS "Notes:\n"][LIT_CHARS " Note #1\n"]]} <REDIR_DLESS "<<"> 0), > ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "verify commits and notes">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit log > actual &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "remove some commits">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit reset --hard HEAD~1 &&\n"> <LIT_CHARS "\tgit reflog expire --expire=now HEAD &&\n"> <LIT_CHARS "\tgit gc --prune=now\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "verify that commits are gone">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git cat-file -p 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n"> <LIT_CHARS "\tgit cat-file -p 08341ad9e94faa089d60fd3f523affb25c6da189 &&\n"> <LIT_CHARS "\tgit cat-file -p ab5f302035f2e7aaf04265f08b42034c23256e1f\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "verify that notes are still present">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n"> <LIT_CHARS "\tgit notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&\n"> <LIT_CHARS "\tgit notes show ab5f302035f2e7aaf04265f08b42034c23256e1f\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "prune -n does not remove notes">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit notes list > expect &&\n"> <LIT_CHARS "\tgit notes prune -n &&\n"> <LIT_CHARS "\tgit notes list > actual &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]} ) (Com {[LIT_CHARS cat]} < (FilenameRedirectNode filename={[LIT_CHARS expect]} <REDIR_GREAT ">"> 1), (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29\n"]]} <REDIR_DLESS "<<"> 0), > ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "prune -n lists prunable notes">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit notes prune -n > actual &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "prune notes">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit notes prune\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "verify that notes are gone">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n"> <LIT_CHARS "\tgit notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&\n"> <LIT_CHARS "\tgit notes show ab5f302035f2e7aaf04265f08b42034c23256e1f\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "remove some commits">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit reset --hard HEAD~1 &&\n"> <LIT_CHARS "\tgit reflog expire --expire=now HEAD &&\n"> <LIT_CHARS "\tgit gc --prune=now\n">]} ) (Com {[LIT_CHARS cat]} < (FilenameRedirectNode filename={[LIT_CHARS expect]} <REDIR_GREAT ">"> 1), (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "08341ad9e94faa089d60fd3f523affb25c6da189\n"]]} <REDIR_DLESS "<<"> 0), > ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "prune -v notes">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit notes prune -v > actual &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "verify that notes are gone">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&\n"> <LIT_CHARS "\ttest_must_fail git notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&\n"> <LIT_CHARS "\tgit notes show ab5f302035f2e7aaf04265f08b42034c23256e1f\n">]} ) (Com {[LIT_CHARS test_done]} ) )