diff options
author | Nicolas Pitre <nico@cam.org> | 2007-04-09 09:06:28 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-10 23:48:14 +0400 |
commit | 57059091fad25427bce9b3d47e073ce0518d164b (patch) | |
tree | 9e51d626819d9eedc260a157774dc8fe1f06f5e4 /builtin-fsck.c | |
parent | 8ff21b1a3307c7059ea1e00b5117a50a2bc5fec8 (diff) |
get rid of num_packed_objects()
The coming index format change doesn't allow for the number of objects
to be determined from the size of the index file directly. Instead, Let's
initialize a field in the packed_git structure with the object count when
the index is validated since the count is always known at that point.
While at it let's reorder some struct packed_git fields to avoid padding
due to needed 64-bit alignment for some of them.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-fsck.c')
-rw-r--r-- | builtin-fsck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-fsck.c b/builtin-fsck.c index 4d8b66c3444..44a02d31201 100644 --- a/builtin-fsck.c +++ b/builtin-fsck.c @@ -653,7 +653,7 @@ int cmd_fsck(int argc, char **argv, const char *prefix) verify_pack(p, 0); for (p = packed_git; p; p = p->next) { - uint32_t i, num = num_packed_objects(p); + uint32_t i, num = p->num_objects; for (i = 0; i < num; i++) fsck_sha1(nth_packed_object_sha1(p, i)); } |