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 --- blob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'blob.c') diff --git a/blob.c b/blob.c index 36f9abda19..182718aba9 100644 --- a/blob.c +++ b/blob.c @@ -10,7 +10,7 @@ struct blob *lookup_blob(struct repository *r, const struct object_id *oid) struct object *obj = lookup_object(r, oid); if (!obj) return create_object(r, oid, alloc_blob_node(r)); - return object_as_type(r, obj, OBJ_BLOB, 0); + return object_as_type(obj, OBJ_BLOB, 0); } int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size) -- cgit v1.2.3