t5510-fetch: fix negated 'test_i18ngrep' invocation
[gitweb.git] / tree.c
diff --git a/tree.c b/tree.c
index 9f0457c05acf1e4d7bd9f215dd3c710b3cb2df4f..4720945e6a68c4311458cc60e22c25edb07c375e 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -1,4 +1,3 @@
-#define NO_THE_INDEX_COMPATIBILITY_MACROS
 #include "cache.h"
 #include "cache-tree.h"
 #include "tree.h"
@@ -198,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);
 }