shallow: add repository argument to register_shallow
[gitweb.git] / builtin / pack-objects.c
index 4bdae5a1d8f4c988064475c0583e19c06dabf101..97a5963efb6ce8ea0dfe10023729f6cca3d119a0 100644 (file)
@@ -1516,7 +1516,8 @@ static void check_object(struct object_entry *entry)
                unuse_pack(&w_curs);
        }
 
-       entry->type = oid_object_info(&entry->idx.oid, &entry->size);
+       entry->type = oid_object_info(the_repository, &entry->idx.oid,
+                                     &entry->size);
        /*
         * The error condition is checked in prepare_pack().  This is
         * to permit a missing preferred base object to be ignored
@@ -1571,14 +1572,16 @@ static void drop_reused_delta(struct object_entry *entry)
 
        oi.sizep = &entry->size;
        oi.typep = &entry->type;
-       if (packed_object_info(entry->in_pack, entry->in_pack_offset, &oi) < 0) {
+       if (packed_object_info(the_repository, entry->in_pack,
+                              entry->in_pack_offset, &oi) < 0) {
                /*
                 * We failed to get the info from this pack for some reason;
                 * fall back to sha1_object_info, which may find another copy.
                 * And if that fails, the error will be recorded in entry->type
                 * and dealt with in prepare_pack().
                 */
-               entry->type = oid_object_info(&entry->idx.oid, &entry->size);
+               entry->type = oid_object_info(the_repository, &entry->idx.oid,
+                                             &entry->size);
        }
 }
 
@@ -2706,7 +2709,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs)
 static int add_loose_object(const struct object_id *oid, const char *path,
                            void *data)
 {
-       enum object_type type = oid_object_info(oid, NULL);
+       enum object_type type = oid_object_info(the_repository, oid, NULL);
 
        if (type < 0) {
                warning("loose object at %s could not be examined", path);
@@ -2872,7 +2875,7 @@ static void get_object_list(int ac, const char **av)
                                struct object_id oid;
                                if (get_oid_hex(line + 10, &oid))
                                        die("not an SHA-1 '%s'", line + 10);
-                               register_shallow(&oid);
+                               register_shallow(the_repository, &oid);
                                use_bitmap_index = 0;
                                continue;
                        }