summaryrefslogtreecommitdiff
path: root/builtin-count-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-count-objects.c')
-rw-r--r--builtin-count-objects.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-count-objects.c b/builtin-count-objects.c
index ff90ebd..ac65e03 100644
--- a/builtin-count-objects.c
+++ b/builtin-count-objects.c
@@ -111,6 +111,8 @@ 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;
+ if (!p->index_data && open_pack_index(p))
+ continue;
packed += p->num_objects;
num_pack++;
}