t7700: clean up .keep file in bitmap-writing test
authorJeff King <peff@peff.net>
Wed, 31 Jul 2019 05:37:36 +0000 (01:37 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 31 Jul 2019 20:14:04 +0000 (13:14 -0700)
After our test snippet finishes, the .keep file is left in place, making
it hard to do further tests of the auto-bitmap-writing code (since it
suppresses the feature completely). Let's clean it up.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7700-repack.sh
index 0e9af832c9790f3e329fc59d61b8bc177c151b48..8d9a358df8223a4fec6c09818aa357ef73362552 100755 (executable)
@@ -243,6 +243,7 @@ test_expect_success 'no bitmaps created if .keep files present' '
        pack=$(ls bare.git/objects/pack/*.pack) &&
        test_path_is_file "$pack" &&
        keep=${pack%.pack}.keep &&
+       test_when_finished "rm -f \"\$keep\"" &&
        >"$keep" &&
        git -C bare.git repack -ad &&
        find bare.git/objects/pack/ -type f -name "*.bitmap" >actual &&