diff options
Diffstat (limited to 'notes-cache.c')
-rw-r--r-- | notes-cache.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/notes-cache.c b/notes-cache.c index 9dfd251a81..0e1d5b1ac7 100644 --- a/notes-cache.c +++ b/notes-cache.c @@ -1,9 +1,11 @@ -#include "cache.h" +#include "git-compat-util.h" #include "notes-cache.h" -#include "object-store.h" +#include "object-store-ll.h" +#include "pretty.h" #include "repository.h" #include "commit.h" #include "refs.h" +#include "strbuf.h" static int notes_cache_match_validity(struct repository *r, const char *ref, @@ -23,7 +25,8 @@ static int notes_cache_match_validity(struct repository *r, return 0; memset(&pretty_ctx, 0, sizeof(pretty_ctx)); - format_commit_message(commit, "%s", &msg, &pretty_ctx); + repo_format_commit_message(r, commit, "%s", &msg, + &pretty_ctx); strbuf_trim(&msg); ret = !strcmp(msg.buf, validity); @@ -81,7 +84,7 @@ char *notes_cache_get(struct notes_cache *c, struct object_id *key_oid, value_oid = get_note(&c->tree, key_oid); if (!value_oid) return NULL; - value = read_object_file(value_oid, &type, &size); + value = repo_read_object_file(the_repository, value_oid, &type, &size); *outsize = size; return value; |