From 45a187cc34b5016842b91ef14b59e40505afff46 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 13 Apr 2021 03:16:36 -0400 Subject: lookup_unknown_object(): take a repository argument All of the other lookup_foo() functions take a repository argument, but lookup_unknown_object() was never converted, and it uses the_repository internally. Let's fix that. We could leave a wrapper that uses the_repository, but there aren't that many calls, so we'll just convert them all. I looked briefly at each site to see if we had a repository struct (besides the_repository) we could pass, but none of them do (so this conversion to pass the_repository is a pure noop in each case, though it does take us one step closer to eventually getting rid of the_repository). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'object.h') diff --git a/object.h b/object.h index 59daadce21..87a6da47c8 100644 --- a/object.h +++ b/object.h @@ -145,7 +145,7 @@ struct object *parse_object_or_die(const struct object_id *oid, const char *name struct object *parse_object_buffer(struct repository *r, const struct object_id *oid, enum object_type type, unsigned long size, void *buffer, int *eaten_p); /** Returns the object, with potentially excess memory allocated. **/ -struct object *lookup_unknown_object(const struct object_id *oid); +struct object *lookup_unknown_object(struct repository *r, const struct object_id *oid); struct object_list *object_list_insert(struct object *item, struct object_list **list_p); -- cgit v1.2.3