Merge branch 'ew/gc-auto-pack-limit-fix'
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Jul 2016 18:24:12 +0000 (11:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Jul 2016 18:24:12 +0000 (11:24 -0700)
"gc.autoPackLimit" when set to 1 should not trigger a repacking
when there is only one pack, but the code counted poorly and did
so.

* ew/gc-auto-pack-limit-fix:
gc: fix off-by-one error with gc.autoPackLimit

builtin/gc.c
index c583aad6ec2896c8a6ad3b35671e92a3c0478bcd..332bcf7e7a0ae1900199349870103c388c9ffb35 100644 (file)
@@ -177,7 +177,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)