Code

clean up and optimize nth_packed_object_sha1() usage
authorNicolas Pitre <nico@cam.org>
Wed, 16 Jul 2008 06:31:36 +0000 (02:31 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Jul 2008 16:33:28 +0000 (09:33 -0700)
commit3205364fc4c1565a587f0f4f1751f4ebd1bc5c12
tree1fd1300a6f531f4001c58de1e7e38d172cd7ff1f
parentc86a54b714df7a5cefeb79f09a422e3fe0e9d34a
clean up and optimize nth_packed_object_sha1() usage

Let's avoid the open coded pack index reference in pack-object and use
nth_packed_object_sha1() instead.  This will help encapsulating index
format differences in one place.

And while at it there is no reason to copy SHA1's over and over while a
direct pointer to it in the index will do just fine.

(based on commit d72308e01c5977177cda0aed06cfeee9192e1247)

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c
cache.h
fsck-objects.c
pack-check.c
sha1_file.c
sha1_name.c