index-pack: use streaming interface for collision test on large blobs
When putting whole objects in core is unavoidable, try match object type and size first before actually inflating. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
8a2e163ccd
commit
4614043c8f
@@ -418,4 +418,9 @@ test_expect_success \
|
||||
'test_must_fail git index-pack -o bad.idx test-3.pack 2>msg &&
|
||||
grep "SHA1 COLLISION FOUND" msg'
|
||||
|
||||
test_expect_success \
|
||||
'make sure index-pack detects the SHA1 collision (large blobs)' \
|
||||
'test_must_fail git -c core.bigfilethreshold=1 index-pack -o bad.idx test-3.pack 2>msg &&
|
||||
grep "SHA1 COLLISION FOUND" msg'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user