Junio C Hamano writes:
>> +if (type != OBJ_BLOB || size < big_file_threshold) {
>> +data = unpack_entry(p, entries[i].offset, &type, &size);
>> +data_valid = 1;
>
> This codepath slurps the data in-core to hash and data is later
> freed, i.e. no
Nguyễn Thái Ngọc Duy writes:
> For this particular operation, not unpacking the blob and letting
> check_sha1_signature, which supports streaming interface, do the job
> is sufficient.
That reasoning is sound, I would think, but...
> We will call the callback function "fn" with NULL as "data".
For blobs, we want to make sure the on-disk data is not corrupted
(i.e. can be inflated and produce the expected SHA-1). Blob content is
opaque, there's nothing else inside to check for.
For really large blobs, we may want to avoid unpacking the entire blob
in memory, just to check whether it prod
3 matches
Mail list logo