git-gc --auto: protect ourselves from accumulated cruft
authorJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2007 07:44:17 +0000 (00:44 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Sep 2007 06:12:15 +0000 (23:12 -0700)
commita087cc9819d5790a0aeb42c2bd74f781c555e8d6
tree8987c5276acacad2520e12db970e4a1158ae3adf
parente9831e83e063844b90cf9e525d0003715dd8b395
git-gc --auto: protect ourselves from accumulated cruft

Deciding to run "repack -d -l" when there are too many
loose objects would backfire when there are too many loose
objects that are unreachable, because repacking that way would
never improve the situation.  Detect that case by checking the
number of loose objects again after automatic garbage collection
runs, and issue an warning to run "prune" manually.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-gc.c