Re: [PATCH] Find size of SHA1 object without inflating everything.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 2, 2005, 22:47 UTC
- Message-ID
- <7vis0w1ime.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.58.0506021508020.1876@ppc970.osdl.org>
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
LT> On Thu, 2 Jun 2005, Junio C Hamano wrote:
>> >> +int sha1_file_size(const unsigned char *sha1, unsigned long *sizep)
LT> ...
>> + ret = unpack_sha1_header(&stream, map, mapsize, hdr, sizeof(hdr));
LT> ...
>> + delta_data_head = unpack_sha1_rest(&stream, hdr, 200);
LT> Why do you do this?
Because I was not thinking when I wrote "char hdr[1024]".
Nico pointed out the same problem and you have a fixed version of both in your mailbox.