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 --- t/helper/test-reach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c index a0272178b7..ccf837cb33 100644 --- a/t/helper/test-reach.c +++ b/t/helper/test-reach.c @@ -67,7 +67,7 @@ int cmd__reach(int ac, const char **av) die("failed to load commit for input %s resulting in oid %s\n", buf.buf, oid_to_hex(&oid)); - c = object_as_type(r, peeled, OBJ_COMMIT, 0); + c = object_as_type(peeled, OBJ_COMMIT, 0); if (!c) die("failed to load commit for input %s resulting in oid %s\n", -- cgit v1.2.3