X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=pack-redundant.c;h=f5cd0ac59e5794a375172b998399a546eaef4ab1;hb=5348337a3406a28a2db35fdfba8cb766b0241949;hp=87077e150c1b53a26464089a2cabafafb32e6636;hpb=aff787b52bc8e1d7fcfce5d28d1fc569f905d3c1;p=git.git diff --git a/pack-redundant.c b/pack-redundant.c index 87077e150..f5cd0ac59 100644 --- a/pack-redundant.c +++ b/pack-redundant.c @@ -81,7 +81,7 @@ static struct llist * llist_copy(struct llist *list) { struct llist *ret; struct llist_item *new, *old, *prev; - + llist_init(&ret); if ((ret->size = list->size) == 0) @@ -100,7 +100,7 @@ static struct llist * llist_copy(struct llist *list) } new->next = NULL; ret->back = new; - + return ret; } @@ -550,6 +550,9 @@ static struct pack_list * add_pack(struct packed_git *p) l.pack = p; llist_init(&l.all_objects); + if (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;