sequencer.c: mark more strings for translation
[gitweb.git] / tree.c
diff --git a/tree.c b/tree.c
index 63730e3fb46e47872bddce714cba96c0af3a7d9c..2c9c49725ca0eb311a4e82081a6748db7c8e1fcd 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -5,6 +5,7 @@
 #include "blob.h"
 #include "commit.h"
 #include "tag.h"
+#include "alloc.h"
 #include "tree-walk.h"
 
 const char *tree_type = "tree";
@@ -109,7 +110,7 @@ static int read_tree_1(struct tree *tree, struct strbuf *base,
                                    oid_to_hex(entry.oid),
                                    base->buf, entry.path);
 
-                       oidcpy(&oid, &commit->tree->object.oid);
+                       oidcpy(&oid, get_commit_tree_oid(commit));
                }
                else
                        continue;
@@ -197,7 +198,7 @@ struct tree *lookup_tree(const struct object_id *oid)
        struct object *obj = lookup_object(oid->hash);
        if (!obj)
                return create_object(the_repository, oid->hash,
-                                    alloc_tree_node());
+                                    alloc_tree_node(the_repository));
        return object_as_type(obj, OBJ_TREE, 0);
 }
 
@@ -249,7 +250,7 @@ struct tree *parse_tree_indirect(const struct object_id *oid)
                if (obj->type == OBJ_TREE)
                        return (struct tree *) obj;
                else if (obj->type == OBJ_COMMIT)
-                       obj = &(((struct commit *) obj)->tree->object);
+                       obj = &(get_commit_tree(((struct commit *)obj))->object);
                else if (obj->type == OBJ_TAG)
                        obj = ((struct tag *) obj)->tagged;
                else