diff options
author | Nicolas Pitre <nico@cam.org> | 2007-04-09 07:06:28 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-10 21:48:14 +0200 |
commit | 57059091fad25427bce9b3d47e073ce0518d164b (patch) | |
tree | 9e51d626819d9eedc260a157774dc8fe1f06f5e4 /sha1_name.c | |
parent | git-archive: make tar the default format (diff) | |
download | git-57059091fad25427bce9b3d47e073ce0518d164b.tar.xz git-57059091fad25427bce9b3d47e073ce0518d164b.zip |
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 '')
-rw-r--r-- | sha1_name.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c index 267ea3f3ed..b0b12bbe9d 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -76,7 +76,7 @@ static int find_short_packed_object(int len, const unsigned char *match, unsigne prepare_packed_git(); for (p = packed_git; p && found < 2; p = p->next) { - uint32_t num = num_packed_objects(p); + uint32_t num = p->num_objects; uint32_t first = 0, last = num; while (first < last) { uint32_t mid = (first + last) / 2; |