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 <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Wong committed
Jun 25, 2016 at 06:46 UTC
5f4e3bf536621675efd51020eb2950986b882e18
1 file changed
+1
-1
builtin/gc.c
+1
-1
@@ -145,7 +145,7 @@ static int too_many_packs(void)
145
*/
146
cnt++;
147
}
148
- return gc_auto_pack_limit <= cnt;
148
+ return gc_auto_pack_limit < cnt;
149
}
150
151
static void add_repack_all_option(void)