From 21e1ee8f4f4b7767d506b02504e97f6bcaef13a0 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 28 Jun 2018 18:21:57 -0700 Subject: commit: add repository argument to lookup_commit_reference_gently Add a repository argument to allow callers of lookup_commit_reference_gently 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 --- notes-cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'notes-cache.c') diff --git a/notes-cache.c b/notes-cache.c index d577003177..d87e7ca91c 100644 --- a/notes-cache.c +++ b/notes-cache.c @@ -1,6 +1,7 @@ #include "cache.h" #include "notes-cache.h" #include "object-store.h" +#include "repository.h" #include "commit.h" #include "refs.h" @@ -15,7 +16,7 @@ static int notes_cache_match_validity(const char *ref, const char *validity) if (read_ref(ref, &oid) < 0) return 0; - commit = lookup_commit_reference_gently(&oid, 1); + commit = lookup_commit_reference_gently(the_repository, &oid, 1); if (!commit) return 0; -- cgit v1.2.3