Files
git/builtin
brian m. carlson 9fd750461b Convert the verify_pack callback to struct object_id
Make the verify_pack_callback take a pointer to struct object_id.
Change the pack checksum to use GIT_MAX_RAWSZ, even though it is not
strictly an object ID.  Doing so ensures resilience against future hash
size changes, and allows us to remove hard-coded assumptions about how
big the buffer needs to be.

Also, use a union to convert the pointer from nth_packed_object_sha1 to
to a pointer to struct object_id.  This behavior is compatible with GCC
and clang and explicitly sanctioned by C11.  The alternatives are to
just perform a cast, which would run afoul of strict aliasing rules, but
should just work, and changing the pointer into an instance of struct
object_id and copying the value.  The latter operation could seriously
bloat memory usage on fsck, which already uses a lot of memory on some
repositories.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-08 15:12:57 +09:00
..
2017-05-08 15:12:57 +09:00
2016-11-22 13:55:20 -08:00
2017-03-31 08:33:56 -07:00
2017-04-26 15:39:08 +09:00
2017-05-08 15:12:57 +09:00
2017-04-13 17:53:08 -07:00
2017-03-31 08:33:56 -07:00
2016-09-29 15:42:18 -07:00
2017-01-18 15:12:15 -08:00
2017-04-02 09:49:24 -07:00
2017-04-19 21:37:13 -07:00
2017-03-24 13:07:37 -07:00
2017-01-23 18:51:56 -08:00
2017-04-11 00:21:51 -07:00
2017-04-26 15:39:12 +09:00