cache: convert get_graft_file to handle arbitrary repositories
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index dedbf5d476f207e39c1b7853ec8c97553181e5fb..9e7c90cf50bdf845a761c65853af7fcce25464aa 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -11,6 +11,7 @@
 #include "cache.h"
 #include "config.h"
 #include "dir.h"
+#include "object-store.h"
 #include "attr.h"
 #include "refs.h"
 #include "wildmatch.h"
@@ -243,7 +244,7 @@ static int do_read_blob(const struct object_id *oid, struct oid_stat *oid_stat,
        *size_out = 0;
        *data_out = NULL;
 
-       data = read_sha1_file(oid->hash, &type, &sz);
+       data = read_object_file(oid, &type, &sz);
        if (!data || type != OBJ_BLOB) {
                free(data);
                return -1;