#include "archive.h"
#include "streaming.h"
#include "utf8.h"
+#include "object-store.h"
#include "userdiff.h"
#include "xdiff-interface.h"
compressed_size = 0;
buffer = NULL;
} else if (S_ISREG(mode) || S_ISLNK(mode)) {
- enum object_type type = sha1_object_info(oid->hash, &size);
+ enum object_type type = oid_object_info(the_repository, oid,
+ &size);
method = 0;
attr2 = S_ISLNK(mode) ? ((mode | 0777) << 16) :
if (S_ISREG(mode) && type == OBJ_BLOB && !args->convert &&
size > big_file_threshold) {
- stream = open_istream(oid->hash, &type, &size, NULL);
+ stream = open_istream(oid, &type, &size, NULL);
if (!stream)
return error("cannot stream blob %s",
oid_to_hex(oid));
flags |= ZIP_STREAM;
out = buffer = NULL;
} else {
- buffer = sha1_file_to_archive(args, path, oid->hash, mode,
- &type, &size);
+ buffer = object_file_to_archive(args, path, oid, mode,
+ &type, &size);
if (!buffer)
return error("cannot read %s",
oid_to_hex(oid));