From 109cd76dd3467bd05f8d2145b857006649741d5c Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 28 Jun 2018 18:21:51 -0700 Subject: object: add repository argument to parse_object Add a repository argument to allow the callers of parse_object to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- object.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'object.h') diff --git a/object.h b/object.h index 1b96073601..882f47fbc8 100644 --- a/object.h +++ b/object.h @@ -120,7 +120,8 @@ void *object_as_type(struct object *obj, enum object_type type, int quiet); * * Returns NULL if the object is missing or corrupt. */ -struct object *parse_object(const struct object_id *oid); +#define parse_object(r, oid) parse_object_##r(oid) +struct object *parse_object_the_repository(const struct object_id *oid); /* * Like parse_object, but will die() instead of returning NULL. If the -- cgit v1.2.3