t4200: make "rerere gc" test more robust
commitc277344182b6ff423b8395ea0bf7a75ee0db78e2
authorJunio C Hamano <gitster@pobox.com>
Tue, 22 Aug 2017 21:14:03 +0000 (22 14:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Aug 2017 21:51:02 +0000 (22 14:51 -0700)
tree23b7f74dd823d384e394e951776b7f5051f0f776
parent780fbeba63e792199a0974826a5ef0267af83c1a
t4200: make "rerere gc" test more robust

The test blindly trusted that there may be _some_ entries left in
the rerere database, and used them by updating their timestamps to
see if the gc threshold variables are honoured correctly.  This
won't work if there is no entry in the database when the test
begins.

Instead, clear the rerere database, and populate it with a few known
entries (which are bogus, but for the purpose of testing "garbage
collection", it does not matter---we want to make sure we collect
old cruft, even if the files are corrupt rerere database entries),
and use them for the expiry test.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4200-rerere.sh