pack-objects: merge read_lock and lock in packing_data struct
[gitweb.git] / builtin / unpack-file.c
index 32e01555774c838e489fd33c675488e754c3e8e2..58652229f273bf93e55b0ff5eef1421096cfe719 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "config.h"
+#include "object-store.h"
 
 static char *create_temp_file(struct object_id *oid)
 {
@@ -9,7 +10,7 @@ static char *create_temp_file(struct object_id *oid)
        unsigned long size;
        int fd;
 
-       buf = read_sha1_file(oid->hash, &type, &size);
+       buf = read_object_file(oid, &type, &size);
        if (!buf || type != OBJ_BLOB)
                die("unable to read blob object %s", oid_to_hex(oid));