|
|
|
@ -297,13 +297,15 @@ const void *get_cached_commit_buffer(struct repository *r, const struct commit *
@@ -297,13 +297,15 @@ const void *get_cached_commit_buffer(struct repository *r, const struct commit *
|
|
|
|
|
return v->buffer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const void *get_commit_buffer(const struct commit *commit, unsigned long *sizep) |
|
|
|
|
const void *repo_get_commit_buffer(struct repository *r, |
|
|
|
|
const struct commit *commit, |
|
|
|
|
unsigned long *sizep) |
|
|
|
|
{ |
|
|
|
|
const void *ret = get_cached_commit_buffer(the_repository, commit, sizep); |
|
|
|
|
const void *ret = get_cached_commit_buffer(r, commit, sizep); |
|
|
|
|
if (!ret) { |
|
|
|
|
enum object_type type; |
|
|
|
|
unsigned long size; |
|
|
|
|
ret = read_object_file(&commit->object.oid, &type, &size); |
|
|
|
|
ret = repo_read_object_file(r, &commit->object.oid, &type, &size); |
|
|
|
|
if (!ret) |
|
|
|
|
die("cannot read commit object %s", |
|
|
|
|
oid_to_hex(&commit->object.oid)); |
|
|
|
|