object: add repository argument to object_as_type
[gitweb.git] / tag.c
diff --git a/tag.c b/tag.c
index 7c12426b4eaba595b9b652fa47952c961306e44f..a14a4f230374193255611960b2a00936caa4eab0 100644 (file)
--- a/tag.c
+++ b/tag.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "tag.h"
+#include "object-store.h"
 #include "commit.h"
 #include "tree.h"
 #include "blob.h"
@@ -67,7 +68,8 @@ struct object *deref_tag(struct object *o, const char *warn, int warnlen)
 {
        while (o && o->type == OBJ_TAG)
                if (((struct tag *)o)->tagged)
-                       o = parse_object(&((struct tag *)o)->tagged->oid);
+                       o = parse_object(the_repository,
+                                        &((struct tag *)o)->tagged->oid);
                else
                        o = NULL;
        if (!o && warn) {
@@ -81,7 +83,7 @@ struct object *deref_tag(struct object *o, const char *warn, int warnlen)
 struct object *deref_tag_noverify(struct object *o)
 {
        while (o && o->type == OBJ_TAG) {
-               o = parse_object(&o->oid);
+               o = parse_object(the_repository, &o->oid);
                if (o && o->type == OBJ_TAG && ((struct tag *)o)->tagged)
                        o = ((struct tag *)o)->tagged;
                else
@@ -92,11 +94,11 @@ struct object *deref_tag_noverify(struct object *o)
 
 struct tag *lookup_tag(const struct object_id *oid)
 {
-       struct object *obj = lookup_object(oid->hash);
+       struct object *obj = lookup_object(the_repository, oid->hash);
        if (!obj)
                return create_object(the_repository, oid->hash,
                                     alloc_tag_node(the_repository));
-       return object_as_type(obj, OBJ_TAG, 0);
+       return object_as_type(the_repository, obj, OBJ_TAG, 0);
 }
 
 static timestamp_t parse_tag_date(const char *buf, const char *tail)