X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=pack-redundant.c;h=25b81a445c8fafe0c00ce30082b7d9a7c22ccf1e;hb=18e143487ddb5b32b2f6003972d2115bb4ac460f;hp=87077e150c1b53a26464089a2cabafafb32e6636;hpb=1b2782a5e2f88bf5e6e2cbb58e54fea015e21af5;p=git.git diff --git a/pack-redundant.c b/pack-redundant.c index 87077e150..25b81a445 100644 --- a/pack-redundant.c +++ b/pack-redundant.c @@ -11,7 +11,7 @@ #define BLKSIZE 512 static const char pack_redundant_usage[] = -"git-pack-redundant [ --verbose ] [ --alt-odb ] < --all | <.pack filename> ...>"; +"git pack-redundant [ --verbose ] [ --alt-odb ] < --all | <.pack filename> ...>"; static int load_all_packs, verbose, alt_odb; @@ -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;