summaryrefslogtreecommitdiff
path: root/builtin/unpack-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/unpack-file.c')
-rw-r--r--builtin/unpack-file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c
index 32e0155577..58652229f2 100644
--- a/builtin/unpack-file.c
+++ b/builtin/unpack-file.c
@@ -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));