summaryrefslogtreecommitdiff
path: root/t/t5300-pack-object.sh
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-11-12 13:23:58 -0500
committerJunio C Hamano <gitster@pobox.com>2008-11-12 14:55:03 -0800
commita1e4760fcfece8eb9b556f35a04a521fdee3963c (patch)
tree4923753aaa855dedfab330b250856b99cca5cea2 /t/t5300-pack-object.sh
parentfa7b3c2f752a10a5dca9989d4a1c4b93ffa7f943 (diff)
downloadgit-a1e4760fcfece8eb9b556f35a04a521fdee3963c.tar.gz
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 <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5300-pack-object.sh')
-rwxr-xr-xt/t5300-pack-object.sh6
1 files changed, 6 insertions, 0 deletions
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 <obj-list) &&
+ test $(wc -l <obj-list) = $(ls test-9-*.pack | wc -l)
+'
+
test_done