summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-12-15 00:09:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-12-28 18:06:33 (GMT)
commit6a7895fd8a3bd409f2b71ffc355d5142172cc2a0 (patch)
treefc7736800e138da6506f50485fb246615dde0ad5 /commit.h
parent4f542b7a7f944986e3f7567f7e94b256b1929f6c (diff)
downloadgit-6a7895fd8a3bd409f2b71ffc355d5142172cc2a0.zip
git-6a7895fd8a3bd409f2b71ffc355d5142172cc2a0.tar.gz
git-6a7895fd8a3bd409f2b71ffc355d5142172cc2a0.tar.bz2
commit: prepare free_commit_buffer and release_commit_memory for any repo
Pass the object pool to free_commit_buffer and release_commit_memory, such that we can eliminate access to 'the_repository'. Also remove the TODO in release_commit_memory, as commit->util was removed in 9d2c97016f (commit.h: delete 'util' field in struct commit, 2018-05-19) Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit.h b/commit.h
index 2e6b799..d2779a2 100644
--- a/commit.h
+++ b/commit.h
@@ -140,7 +140,7 @@ void repo_unuse_commit_buffer(struct repository *r,
/*
* Free any cached object buffer associated with the commit.
*/
-void free_commit_buffer(struct commit *);
+void free_commit_buffer(struct parsed_object_pool *pool, struct commit *);
struct tree *get_commit_tree(const struct commit *);
struct object_id *get_commit_tree_oid(const struct commit *);
@@ -149,7 +149,7 @@ struct object_id *get_commit_tree_oid(const struct commit *);
* Release memory related to a commit, including the parent list and
* any cached object buffer.
*/
-void release_commit_memory(struct commit *c);
+void release_commit_memory(struct parsed_object_pool *pool, struct commit *c);
/*
* Disassociate any cached object buffer from the commit, but do not free it.