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>
This commit is contained in:

committed by
Junio C Hamano

parent
fa7b3c2f75
commit
a1e4760fcf
@ -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
|
||||
|
Reference in New Issue
Block a user