object: add repository argument to object_as_type
[gitweb.git] / log-tree.c
index 4a3907fea02d50e1074ca1b785780a0753e77468..0eb7c6027fa640a4f9cf0ddd29b1d162327dbfa5 100644 (file)
@@ -2,6 +2,7 @@
 #include "config.h"
 #include "diff.h"
 #include "object-store.h"
+#include "repository.h"
 #include "commit.h"
 #include "tag.h"
 #include "graph.h"
@@ -98,13 +99,13 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
                        warning("invalid replace ref %s", refname);
                        return 0;
                }
-               obj = parse_object(&original_oid);
+               obj = parse_object(the_repository, &original_oid);
                if (obj)
                        add_name_decoration(DECORATION_GRAFTED, "replaced", obj);
                return 0;
        }
 
-       obj = parse_object(oid);
+       obj = parse_object(the_repository, oid);
        if (!obj)
                return 0;
 
@@ -125,7 +126,7 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
                if (!obj)
                        break;
                if (!obj->parsed)
-                       parse_object(&obj->oid);
+                       parse_object(the_repository, &obj->oid);
                add_name_decoration(DECORATION_REF_TAG, refname, obj);
        }
        return 0;