Signed-off-by: Derrick Stolee <[email protected]>
---
packfile.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/packfile.c b/packfile.c
index 20b743da91..e72e8a685d 100644
--- a/packfile.c
+++ b/packfile.c
@@ -863,11 +863,14 @@ unsigned long approximate_object_count(void)
{
if (!the_repository->objects->approximate_object_count_valid) {
unsigned long count;
+ struct multi_pack_index *m;
struct packed_git *p;
prepare_packed_git(the_repository);
count = 0;
- for (p = the_repository->objects->packed_git; p; p = p->next) {
+ for (m = get_multi_pack_index(the_repository); m; m = m->next)
+ count += m->num_objects;
+ for (p = get_packed_git(the_repository); p; p = p->next) {
if (open_pack_index(p))
continue;
count += p->num_objects;
--
2.18.0.24.g1b579a2ee9