index-pack: more validation checks and cleanups
commit9096c660a85c4a3d30f8885c766c34ce0766e869
authorNicolas Pitre <nico@cam.org>
Tue, 20 Mar 2007 21:07:48 +0000 (20 17:07 -0400)
committerJunio C Hamano <junkio@cox.net>
Wed, 21 Mar 2007 05:09:59 +0000 (20 22:09 -0700)
tree6e4f7b7b59ddd13684b044754278211a9f62e2e1
parentce9fbf16e0000ecca92870a90e4b30afcb3917b7
index-pack: more validation checks and cleanups

When appending objects to a pack, make sure the appended data is really
what we expect instead of simply loading potentially corrupted objects
and legitimating them by computing a SHA1 of that corrupt data.

With this the sha1_object() can lose its test_for_collision parameter
which is now redundent.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
index-pack.c