commit.c: allow get_cached_commit_buffer to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1a40fc4509
commit
4ff7e5c936
4
commit.c
4
commit.c
@ -283,10 +283,10 @@ void set_commit_buffer(struct repository *r, struct commit *commit, void *buffer
|
||||
v->size = size;
|
||||
}
|
||||
|
||||
const void *get_cached_commit_buffer_the_repository(const struct commit *commit, unsigned long *sizep)
|
||||
const void *get_cached_commit_buffer(struct repository *r, const struct commit *commit, unsigned long *sizep)
|
||||
{
|
||||
struct commit_buffer *v = buffer_slab_peek(
|
||||
the_repository->parsed_objects->buffer_slab, commit);
|
||||
r->parsed_objects->buffer_slab, commit);
|
||||
if (!v) {
|
||||
if (sizep)
|
||||
*sizep = 0;
|
||||
|
Reference in New Issue
Block a user