From 6da43d937ca96d277556fa92c5a664fb1cbcc8ac Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 17 Jun 2020 14:44:08 +0530 Subject: object: drop parsed_object_pool->commit_count 14ba97f8 (alloc: allow arbitrary repositories for alloc functions, 2018-05-15) introduced parsed_object_pool->commit_count to keep count of commits per repository and was used to assign commit->index. However, commit-slab code requires commit->index values to be unique and a global count would be correct, rather than a per-repo count. Let's introduce a static counter variable, `parsed_commits_count` to keep track of parsed commits so far. As commit_count has no use anymore, let's also drop it from the struct. Signed-off-by: Abhishek Kumar Signed-off-by: Junio C Hamano --- alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alloc.h') diff --git a/alloc.h b/alloc.h index ed1071c11e..371d388b55 100644 --- a/alloc.h +++ b/alloc.h @@ -9,7 +9,7 @@ struct repository; void *alloc_blob_node(struct repository *r); void *alloc_tree_node(struct repository *r); -void init_commit_node(struct repository *r, struct commit *c); +void init_commit_node(struct commit *c); void *alloc_commit_node(struct repository *r); void *alloc_tag_node(struct repository *r); void *alloc_object_node(struct repository *r); -- cgit v1.2.3