completion: move __git_complete_index_file() next to its helpers
[gitweb.git] / archive-tar.c
index 24b1ccef3af472c2e4de2f35a805b84be0ea5478..3563bcb9f263f7782a77c679bf9be32af6bd13df 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 (;;) {
@@ -276,12 +276,12 @@ static int write_tar_entry(struct archiver_args *args,
                memcpy(header.name, path, pathlen);
 
        if (S_ISREG(mode) && !args->convert &&
-           sha1_object_info(oid->hash, &size) == OBJ_BLOB &&
+           oid_object_info(oid, &size) == OBJ_BLOB &&
            size > big_file_threshold)
                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 {