Merge branch 'kb/windows-force-utf8'
[gitweb.git] / tree.c
diff --git a/tree.c b/tree.c
index f416afc57d784f8f63ba66ec8c7424ef1e4fcaa1..4720945e6a68c4311458cc60e22c25edb07c375e 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -197,10 +197,9 @@ int read_tree(struct repository *r, struct tree *tree, int stage,
 
 struct tree *lookup_tree(struct repository *r, const struct object_id *oid)
 {
-       struct object *obj = lookup_object(r, oid->hash);
+       struct object *obj = lookup_object(r, oid);
        if (!obj)
-               return create_object(r, oid->hash,
-                                    alloc_tree_node(r));
+               return create_object(r, oid, alloc_tree_node(r));
        return object_as_type(r, obj, OBJ_TREE, 0);
 }