alloc: add repository argument to alloc_commit_node
[gitweb.git] / commit.c
index ca474a7c112855a49b77cce7cdfb83937fa17fae..a9a43e79bae3ced1ea7bd66e09c9f47d8e63997d 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -50,7 +50,8 @@ struct commit *lookup_commit(const struct object_id *oid)
 {
        struct object *obj = lookup_object(oid->hash);
        if (!obj)
-               return create_object(oid->hash, alloc_commit_node());
+               return create_object(the_repository, oid->hash,
+                                    alloc_commit_node(the_repository));
        return object_as_type(obj, OBJ_COMMIT, 0);
 }