X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=server-info.c;h=e4006f0b5bc14f39d28ac98120b2fcccec34de8d;hb=27dedf0c3b78d1072fb5449149421284f9e5297b;hp=0cba8e19f7582fa5771ed6ab94a76e1d87efc53a;hpb=6ddc0964034342519a87fe013781abf31c6db6ad;p=git.git diff --git a/server-info.c b/server-info.c index 0cba8e19..e4006f0b 100644 --- a/server-info.c +++ b/server-info.c @@ -424,7 +424,6 @@ static void find_pack_info_one(int pack_ix) { unsigned char sha1[20]; struct object *o; - struct object_list *ref; int i; struct packed_git *p = info[pack_ix]->p; int num = num_packed_objects(p); @@ -437,8 +436,12 @@ static void find_pack_info_one(int pack_ix) die("corrupt pack file %s?", p->pack_name); if ((o = lookup_object(sha1)) == NULL) die("cannot parse %s", sha1_to_hex(sha1)); - for (ref = o->refs; ref; ref = ref->next) - ref->item->flags = 0; + if (o->refs) { + struct object_refs *refs = o->refs; + int j; + for (j = 0; j < refs->count; j++) + refs->ref[j]->flags = 0; + } o->flags = 0; } @@ -448,8 +451,12 @@ static void find_pack_info_one(int pack_ix) die("corrupt pack file %s?", p->pack_name); if ((o = lookup_object(sha1)) == NULL) die("cannot find %s", sha1_to_hex(sha1)); - for (ref = o->refs; ref; ref = ref->next) - ref->item->flags |= REFERENCED; + if (o->refs) { + struct object_refs *refs = o->refs; + int j; + for (j = 0; j < refs->count; j++) + refs->ref[j]->flags |= REFERENCED; + } o->flags |= INTERNAL; } @@ -460,8 +467,12 @@ static void find_pack_info_one(int pack_ix) die("cannot find %s", sha1_to_hex(sha1)); show(o, pack_ix); - for (ref = o->refs; ref; ref = ref->next) - show(ref->item, pack_ix); + if (o->refs) { + struct object_refs *refs = o->refs; + int j; + for (j = 0; j < refs->count; j++) + show(refs->ref[j], pack_ix); + } } }