]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/fsck.c
object: add repository argument to lookup_object
[thirdparty/git.git] / builtin / fsck.c
index 2b0930101d3e4efae805ee21e39f9247a4cf6a14..12d01e917475eb04a15156dad1e367495ef09a71 100644 (file)
@@ -410,7 +410,7 @@ static void fsck_handle_reflog_oid(const char *refname, struct object_id *oid,
        struct object *obj;
 
        if (!is_null_oid(oid)) {
-               obj = lookup_object(oid->hash);
+               obj = lookup_object(the_repository, oid->hash);
                if (obj && (obj->flags & HAS_OBJ)) {
                        if (timestamp && name_objects)
                                add_decoration(fsck_walk_options.object_names,
@@ -763,7 +763,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
                const char *arg = argv[i];
                struct object_id oid;
                if (!get_oid(arg, &oid)) {
-                       struct object *obj = lookup_object(oid.hash);
+                       struct object *obj = lookup_object(the_repository,
+                                                          oid.hash);
 
                        if (!obj || !(obj->flags & HAS_OBJ)) {
                                if (is_promisor_object(&oid))