object: add repository argument to object_as_type
[gitweb.git] / http-push.c
index 7e38522098bf91c144adaee7f9f5476f8bc72cd2..d2245cc73802fec76ed8613adf84c3995e70b716 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "repository.h"
 #include "commit.h"
 #include "tag.h"
 #include "blob.h"
@@ -14,6 +15,7 @@
 #include "packfile.h"
 #include "object-store.h"
 
+
 #ifdef EXPAT_NEEDS_XMLPARSE_H
 #include <xmlparse.h>
 #else
@@ -720,9 +722,9 @@ static void one_remote_object(const struct object_id *oid)
 {
        struct object *obj;
 
-       obj = lookup_object(oid->hash);
+       obj = lookup_object(the_repository, oid->hash);
        if (!obj)
-               obj = parse_object(oid);
+               obj = parse_object(the_repository, oid);
 
        /* Ignore remote objects that don't exist locally */
        if (!obj)
@@ -1459,7 +1461,7 @@ static void add_remote_info_ref(struct remote_ls_ctx *ls)
                return;
        }
 
-       o = parse_object(&ref->old_oid);
+       o = parse_object(the_repository, &ref->old_oid);
        if (!o) {
                fprintf(stderr,
                        "Unable to parse object %s for remote ref %s\n",