From 4ff7e5c9362875b2296fd2e289dba487a38609f0 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 28 Jun 2018 18:22:17 -0700 Subject: commit.c: allow get_cached_commit_buffer to handle arbitrary repositories Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- commit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commit.c') diff --git a/commit.c b/commit.c index dd8c9c15b1..15b044331a 100644 --- a/commit.c +++ b/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; -- cgit v1.2.3