cache: convert get_graft_file to handle arbitrary repositories
[gitweb.git] / notes-merge.c
index c09c5e0e474a30b0a8bf3d91063c8bbc61e63557..fd96c5ab3d658225e6415446fccacbc8f557e868 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "commit.h"
 #include "refs.h"
+#include "object-store.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "xdiff-interface.h"
@@ -322,7 +323,7 @@ static void write_note_to_worktree(const struct object_id *obj,
 {
        enum object_type type;
        unsigned long size;
-       void *buf = read_sha1_file(note->hash, &type, &size);
+       void *buf = read_object_file(note, &type, &size);
 
        if (!buf)
                die("cannot read note %s for object %s",