blame.c: remove implicit dependency on the_index
[gitweb.git] / server-info.c
index 83460ec0d6f10b26719c076639a08a8a0ce803cc..41050c2449b1adaaeddda30529f9eb1d62981396 100644 (file)
@@ -56,7 +56,7 @@ static int add_info_ref(const char *path, const struct object_id *oid,
                        int flag, void *cb_data)
 {
        FILE *fp = cb_data;
-       struct object *o = parse_object(oid);
+       struct object *o = parse_object(the_repository, oid);
        if (!o)
                return -1;
 
@@ -64,7 +64,7 @@ static int add_info_ref(const char *path, const struct object_id *oid,
                return -1;
 
        if (o->type == OBJ_TAG) {
-               o = deref_tag(o, path, 0);
+               o = deref_tag(the_repository, o, path, 0);
                if (o)
                        if (fprintf(fp, "%s     %s^{}\n",
                                oid_to_hex(&o->oid), path) < 0)
@@ -92,8 +92,6 @@ static struct pack_info {
        int old_num;
        int new_num;
        int nr_alloc;
-       int nr_heads;
-       unsigned char (*head)[20];
 } **info;
 static int num_pack;
 static const char *objdir;
@@ -225,12 +223,9 @@ static void init_pack_info(const char *infofile, int force)
        else
                stale = 1;
 
-       for (i = 0; i < num_pack; i++) {
-               if (stale) {
+       for (i = 0; i < num_pack; i++)
+               if (stale)
                        info[i]->old_num = -1;
-                       info[i]->nr_heads = 0;
-               }
-       }
 
        /* renumber them */
        QSORT(info, num_pack, compare_info);