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.
(based on commit 57059091fa
)
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3205364fc4
commit
852f96b816
@ -110,7 +110,7 @@ int cmd_count_objects(int ac, const char **av, const char *prefix)
|
||||
for (p = packed_git; p; p = p->next) {
|
||||
if (!p->pack_local)
|
||||
continue;
|
||||
packed += num_packed_objects(p);
|
||||
packed += p->num_objects;
|
||||
}
|
||||
printf("count: %lu\n", loose);
|
||||
printf("size: %lu\n", loose_size / 2);
|
||||
|
Reference in New Issue
Block a user