diff options
author | Stefan Beller <sbeller@google.com> | 2018-12-15 03:09:40 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-12-28 21:06:33 +0300 |
commit | 6a7895fd8a3bd409f2b71ffc355d5142172cc2a0 (patch) | |
tree | fc7736800e138da6506f50485fb246615dde0ad5 /commit.h | |
parent | 4f542b7a7f944986e3f7567f7e94b256b1929f6c (diff) |
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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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. |