Skip to content

Commit cb97ae4

Browse files
committed
midx: use midx in approximate_object_count
Signed-off-by: Derrick Stolee <[email protected]>
1 parent a6e7b60 commit cb97ae4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packfile.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,13 @@ unsigned long approximate_object_count(void)
861861
{
862862
if (!the_repository->objects->approximate_object_count_valid) {
863863
unsigned long count;
864+
struct multi_pack_index *m;
864865
struct packed_git *p;
865866

866867
prepare_packed_git(the_repository);
867868
count = 0;
869+
for (m = get_multi_pack_index(the_repository); m; m = m->next)
870+
count += m->num_objects;
868871
for (p = the_repository->objects->packed_git; p; p = p->next) {
869872
if (open_pack_index(p))
870873
continue;

0 commit comments

Comments
 (0)