path: root/notes-cache.c
diff options
authorStefan Beller <>2018-06-29 01:21:57 (GMT)
committerJunio C Hamano <>2018-06-29 17:43:39 (GMT)
commit21e1ee8f4f4b7767d506b02504e97f6bcaef13a0 (patch)
treefe7a386acffd7f8c142858d06a70153cbe3ba2c9 /notes-cache.c
parentf86bcc7b2ce6cad68ba1a48a528e380c6126705e (diff)
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 <>
Diffstat (limited to 'notes-cache.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/notes-cache.c b/notes-cache.c
index d577003..d87e7ca 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;