vscode: let cSpell work on commit messages, too
[gitweb.git] / tree.c
diff --git a/tree.c b/tree.c
index 244eb5e665e931a6b735366d74b5ed2bcbce4c9b..bc7e99020d96eee95b099e3f276aee9ca852c57b 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -2,9 +2,11 @@
 #include "cache.h"
 #include "cache-tree.h"
 #include "tree.h"
+#include "object-store.h"
 #include "blob.h"
 #include "commit.h"
 #include "tag.h"
+#include "alloc.h"
 #include "tree-walk.h"
 
 const char *tree_type = "tree";
@@ -196,7 +198,8 @@ struct tree *lookup_tree(const struct object_id *oid)
 {
        struct object *obj = lookup_object(oid->hash);
        if (!obj)
-               return create_object(oid->hash, alloc_tree_node());
+               return create_object(the_repository, oid->hash,
+                                    alloc_tree_node(the_repository));
        return object_as_type(obj, OBJ_TREE, 0);
 }