object: add repository argument to object_as_type
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index 0eb379f9312fd9f167fea2e0f148c85c47cd2ff0..fcfd3171e83a116d4ba2014b2f88622969f21a2d 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -9,6 +9,7 @@
 #include "iterator.h"
 #include "refs.h"
 #include "refs/refs-internal.h"
+#include "object-store.h"
 #include "object.h"
 #include "tag.h"
 #include "submodule.h"
@@ -304,7 +305,7 @@ enum peel_status peel_object(const struct object_id *name, struct object_id *oid
 
        if (o->type == OBJ_NONE) {
                int type = oid_object_info(the_repository, name, NULL);
-               if (type < 0 || !object_as_type(o, type, 0))
+               if (type < 0 || !object_as_type(the_repository, o, type, 0))
                        return PEEL_INVALID;
        }