From: Eric Wong Date: Sat, 25 Jun 2016 06:46:47 +0000 (+0000) Subject: gc: fix off-by-one error with gc.autoPackLimit X-Git-Tag: v2.9.3~54^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5f4e3bf536621675efd51020eb2950986b882e18?ds=inline;hp=--cc gc: fix off-by-one error with gc.autoPackLimit This matches the documentation and allows gc.autoPackLimit=1 to maintain a single pack without attempting a repack on every "git gc --auto" invocation. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- 5f4e3bf536621675efd51020eb2950986b882e18 diff --git a/builtin/gc.c b/builtin/gc.c index 5c634afc00..15e2780929 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -145,7 +145,7 @@ static int too_many_packs(void) */ cnt++; } - return gc_auto_pack_limit <= cnt; + return gc_auto_pack_limit < cnt; } static void add_repack_all_option(void)