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>
This commit is contained in:

committed by
Junio C Hamano

parent
4f542b7a7f
commit
6a7895fd8a
@ -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)
|
||||
|
Reference in New Issue
Block a user