aboutsummaryrefslogtreecommitdiffstats
path: root/commit.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-11-13 16:12:58 -0800
committerJunio C Hamano <gitster@pobox.com>2018-11-14 17:22:40 +0900
commit70315373ae51b45b9ca0ac43df396bb9035fe449 (patch)
treee89acff8d3af8b5e613c8a7dee5c34f3cab4e4b1 /commit.c
parent07de3fd84049c90d8d873599c43c3979f37166aa (diff)
downloadgit-70315373ae51b45b9ca0ac43df396bb9035fe449.tar.gz
commit: prepare repo_unuse_commit_buffer to handle any repo
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index 4034def16c..7d2f3a9a93 100644
--- a/commit.c
+++ b/commit.c
@@ -318,10 +318,12 @@ const void *repo_get_commit_buffer(struct repository *r,
return ret;
}
-void unuse_commit_buffer(const struct commit *commit, const void *buffer)
+void repo_unuse_commit_buffer(struct repository *r,
+ const struct commit *commit,
+ const void *buffer)
{
struct commit_buffer *v = buffer_slab_peek(
- the_repository->parsed_objects->buffer_slab, commit);
+ r->parsed_objects->buffer_slab, commit);
if (!(v && v->buffer == buffer))
free((void *)buffer);
}