aboutsummaryrefslogtreecommitdiff
path: root/pack-redundant.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack-redundant.c')
-rw-r--r--pack-redundant.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pack-redundant.c b/pack-redundant.c
index 87077e150..06173206f 100644
--- a/pack-redundant.c
+++ b/pack-redundant.c
@@ -550,6 +550,9 @@ static struct pack_list * add_pack(struct packed_git *p)
l.pack = p;
llist_init(&l.all_objects);
+ if (!p->index_data && open_pack_index(p))
+ return NULL;
+
base = p->index_data;
base += 256 * 4 + ((p->index_version < 2) ? 4 : 8);
step = (p->index_version < 2) ? 24 : 20;