sha1_file: convert assert_sha1_type to object_id
[gitweb.git] / archive-tar.c
index 24b1ccef3af472c2e4de2f35a805b84be0ea5478..7a0d31d847904e1314769302af3bd61c4c330e3e 100644 (file)
@@ -119,7 +119,7 @@ static int stream_blocked(const struct object_id *oid)
        char buf[BLOCKSIZE];
        ssize_t readlen;
 
-       st = open_istream(oid->hash, &type, &sz, NULL);
+       st = open_istream(oid, &type, &sz, NULL);
        if (!st)
                return error("cannot stream blob %s", oid_to_hex(oid));
        for (;;) {
@@ -281,7 +281,7 @@ static int write_tar_entry(struct archiver_args *args,
                buffer = NULL;
        else if (S_ISLNK(mode) || S_ISREG(mode)) {
                enum object_type type;
-               buffer = sha1_file_to_archive(args, path, oid->hash, old_mode, &type, &size);
+               buffer = object_file_to_archive(args, path, oid, old_mode, &type, &size);
                if (!buffer)
                        return error("cannot read %s", oid_to_hex(oid));
        } else {