From c1f5eb49620d4f287af28509621a364e3888cfe7 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 28 Jun 2018 18:21:59 -0700 Subject: commit: add repository argument to lookup_commit Add a repository argument to allow callers of lookup_commit to be more specific about which repository to handle. 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: Stefan Beller Signed-off-by: Junio C Hamano --- commit.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'commit.h') diff --git a/commit.h b/commit.h index 2a41113445..cd80dab59c 100644 --- a/commit.h +++ b/commit.h @@ -63,7 +63,8 @@ enum decoration_type { void add_name_decoration(enum decoration_type type, const char *name, struct object *obj); const struct name_decoration *get_name_decoration(const struct object *obj); -struct commit *lookup_commit(const struct object_id *oid); +#define lookup_commit(r, o) lookup_commit_##r(o) +struct commit *lookup_commit_the_repository(const struct object_id *oid); #define lookup_commit_reference(r, o) \ lookup_commit_reference_##r(o) struct commit *lookup_commit_reference_the_repository(const struct object_id *oid); -- cgit v1.2.3