unpack_sha1_file(): detect corrupt loose object files.
authorJunio C Hamano <junkio@cox.net>
Mon, 5 Mar 2007 08:21:37 +0000 (00:21 -0800)
committerJunio C Hamano <junkio@cox.net>
Mon, 5 Mar 2007 08:55:19 +0000 (00:55 -0800)
commit7efbff7531af4281487d54c1dc1401308d988e33
tree025cfaf2225fbc027534d0d4ccd31a45cd4be38f
parentefec43c028c52bc252afdaa586b46f83186d3eaa
unpack_sha1_file(): detect corrupt loose object files.

We did not detect broken loose object files, either when
underlying inflate() signalled the breakage, nor inflate()
finished and we had garbage trailing at the end.  We do better
now.

We also make unpack_sha1_file() a static function to
sha1_file.c, since it is not used by anybody outside.

Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h
sha1_file.c