Merge branch 'jk/tree-walk-overflow'
[gitweb.git] / commit.c
index 8fa1883c61c580578a755cdf2da009203d8d386e..a98de16e3d570e09696a844b018bd4d580d9a30e 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -57,10 +57,9 @@ struct commit *lookup_commit_or_die(const struct object_id *oid, const char *ref
 
 struct commit *lookup_commit(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_commit_node(r));
+               return create_object(r, oid, alloc_commit_node(r));
        return object_as_type(r, obj, OBJ_COMMIT, 0);
 }
 
@@ -449,7 +448,7 @@ int parse_commit_buffer(struct repository *r, struct commit *item, const void *b
        item->date = parse_commit_date(bufptr, tail);
 
        if (check_graph)
-               load_commit_graph_info(the_repository, item);
+               load_commit_graph_info(r, item);
 
        return 0;
 }