From a1e4760fcfece8eb9b556f35a04a521fdee3963c Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Wed, 12 Nov 2008 13:23:58 -0500 Subject: Fix pack.packSizeLimit and --max-pack-size handling If the limit was sufficiently low, having a single object written could bust the limit (by design), but caused the remaining allowed size to go negative for subsequent objects, which for an unsigned variable is a rather huge limit. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- t/t5300-pack-object.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 't/t5300-pack-object.sh') diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index 3a0ef8759c..2852a03265 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -375,4 +375,10 @@ test_expect_success 'index-pack with --strict' ' ) ' +test_expect_success 'tolerate absurdly small packsizelimit' ' + git config pack.packSizeLimit 2 && + packname_9=$(git pack-objects test-9