1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-24 10:46:09 +02:00

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>
This commit is contained in:
Eric Wong 2016-06-25 06:46:47 +00:00 committed by Junio C Hamano
parent 765428699a
commit 5f4e3bf536

View File

@ -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)