Re: [PATCH] Enhance unpack-objects for extracting large objects

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Enhance unpack-objects for extracting large objects

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:12

"Dana How" [off-list ref] writes:
quoted
 * You already have the size here, so if min_blob_size is set
   and the size is larger, you do not even have to call
   write_sha1_file() at all.
The way I read the code,  it looks like unpack-objects needs
the last argument always to be initialized with the SHA-1 computed
from the object contents.  Therefore I always need to call
write_sha1_file(),  even if I don't want it to write anything.
Ah, that is what I missed.

There is a separate function to only hash, named (surprisingly)
"hash_sha1_file().  Maybe you can teach the caller's "don't
write it out" codepath to call it.

Re: [PATCH] Enhance unpack-objects for extracting large objects

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:43:12

On Fri, 25 May 2007, Junio C Hamano wrote:
"Dana How" [off-list ref] writes:
quoted
quoted
 * You already have the size here, so if min_blob_size is set
   and the size is larger, you do not even have to call
   write_sha1_file() at all.
The way I read the code,  it looks like unpack-objects needs
the last argument always to be initialized with the SHA-1 computed
from the object contents.  Therefore I always need to call
write_sha1_file(),  even if I don't want it to write anything.
Ah, that is what I missed.

There is a separate function to only hash, named (surprisingly)
"hash_sha1_file().  Maybe you can teach the caller's "don't
write it out" codepath to call it.
That would be clearer indeed.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help