Don't die in git-http-fetch when fetching packs.
commit1c23d794bfa3b9f3e03b18bb7e542615a924dbe3
authorShawn O. Pearce <spearce@spearce.org>
Wed, 10 Jan 2007 01:04:52 +0000 (9 20:04 -0500)
committerJunio C Hamano <junkio@cox.net>
Wed, 10 Jan 2007 01:54:25 +0000 (9 17:54 -0800)
treefd04e34a716ecabee7eab283ffecb22f0b6fdee1
parentcec21ca7cfd5d8fd19ea87e15f14dce6ee3b3859
Don't die in git-http-fetch when fetching packs.

My sp/mmap changes to pack-check.c modified the function such that
it expects packed_git.pack_size to be populated with the total
bytecount of the packfile by the caller.

But that isn't the case for packs obtained by git-http-fetch as
pack_size was not initialized before being accessed.  This caused
verify_pack to think it had 2^32-21 bytes available when the
downloaded pack perhaps was only 305 bytes in length.  The use_pack
function then later dies with "offset beyond end of packfile"
when computing the overall file checksum.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-fetch.c
http-push.c