diff options
author | Stefan Beller <sbeller@google.com> | 2018-12-14 16:09:40 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-12-28 10:06:33 -0800 |
commit | 6a7895fd8a3bd409f2b71ffc355d5142172cc2a0 (patch) | |
tree | fc7736800e138da6506f50485fb246615dde0ad5 /builtin/fsck.c | |
parent | 4f542b7a7f944986e3f7567f7e94b256b1929f6c (diff) | |
download | git-6a7895fd8a3bd409f2b71ffc355d5142172cc2a0.tar.gz |
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/fsck.c')
-rw-r--r-- | builtin/fsck.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/fsck.c b/builtin/fsck.c index 06eb421720..c476ac6983 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -382,7 +382,8 @@ out: if (obj->type == OBJ_TREE) free_tree_buffer((struct tree *)obj); if (obj->type == OBJ_COMMIT) - free_commit_buffer((struct commit *)obj); + free_commit_buffer(the_repository->parsed_objects, + (struct commit *)obj); return err; } |