Merge branch 'sb/object-store-grafts' into sb/object-store-lookup
[gitweb.git] / tree.c
diff --git a/tree.c b/tree.c
index dc20a2693fdeaac4165b287b37e2fcda940b5392..bc7e99020d96eee95b099e3f276aee9ca852c57b 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -111,7 +111,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;
@@ -251,7 +251,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