summaryrefslogtreecommitdiff
path: root/builtin/rev-list.c
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2018-12-14 16:09:40 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-12-28 10:06:33 -0800
commit6a7895fd8a3bd409f2b71ffc355d5142172cc2a0 (patch)
treefc7736800e138da6506f50485fb246615dde0ad5 /builtin/rev-list.c
parentcommit-graph: convert remaining functions to handle any repo (diff)
downloadtgif-6a7895fd8a3bd409f2b71ffc355d5142172cc2a0.tar.xz
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 'builtin/rev-list.c')
-rw-r--r--builtin/rev-list.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index cc1b70522f..2b301fa315 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -196,7 +196,8 @@ static void finish_commit(struct commit *commit, void *data)
free_commit_list(commit->parents);
commit->parents = NULL;
}
- free_commit_buffer(commit);
+ free_commit_buffer(the_repository->parsed_objects,
+ commit);
}
static inline void finish_object__ma(struct object *obj)