cache: convert get_graft_file to handle arbitrary repositories
[gitweb.git] / config.c
index b0c20e6cb8ab1f5dc3cd3b4573b7e9d6dbf8cd2b..041db3ce7d43af6d9b216cb707bb8c2af41ca79e 100644 (file)
--- a/config.c
+++ b/config.c
@@ -14,6 +14,7 @@
 #include "quote.h"
 #include "hashmap.h"
 #include "string-list.h"
+#include "object-store.h"
 #include "utf8.h"
 #include "dir.h"
 
@@ -1488,7 +1489,7 @@ int git_config_from_blob_oid(config_fn_t fn,
        unsigned long size;
        int ret;
 
-       buf = read_sha1_file(oid->hash, &type, &size);
+       buf = read_object_file(oid, &type, &size);
        if (!buf)
                return error("unable to load config blob object '%s'", name);
        if (type != OBJ_BLOB) {