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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c
index e33acfc4ee..87877a9fab 100644
--- a/builtin/unpack-file.c
+++ b/builtin/unpack-file.c
@@ -1,10 +1,11 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "environment.h"
#include "hex.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
static char *create_temp_file(struct object_id *oid)
{
@@ -14,7 +15,7 @@ static char *create_temp_file(struct object_id *oid)
unsigned long size;
int fd;
- buf = repo_read_object_file(the_repository, oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf || type != OBJ_BLOB)
die("unable to read blob object %s", oid_to_hex(oid));
@@ -43,7 +44,7 @@ int cmd_unpack_file(int argc,
if (repo_get_oid(the_repository, argv[1], &oid))
die("Not a valid object name %s", argv[1]);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
puts(create_temp_file(&oid));
return 0;