]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pack-redundant.c
Lazily open pack index files on demand
[thirdparty/git.git] / pack-redundant.c
index 87077e150c1b53a26464089a2cabafafb32e6636..06173206f09a39b2d9d572d7842f66674264964d 100644 (file)
@@ -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;