Re: [PATCH] Enhance unpack-objects for extracting large objects
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 25, 2007, 19:59 UTC
- Message-ID
- <7viragr7xb.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <56b7f5510705251249u74b754f1y4f8cafd5f5c35f19@mail.gmail.com>
"Dana How" <danahow@gmail.com> writes:
Show 7 quoted lines
>> * 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.