sequencer: refactor transform_todos() to work on a todo_list
[gitweb.git] / archive-tar.c
index 0bc50f6e8944243c4f66659786beb63d6df48df6..a58e1a8ebf874afc856b03f2203ee32d79183b31 100644 (file)
@@ -202,7 +202,7 @@ static void prepare_header(struct archiver_args *args,
                           unsigned int mode, unsigned long size)
 {
        xsnprintf(header->mode, sizeof(header->mode), "%07o", mode & 07777);
-       xsnprintf(header->size, sizeof(header->size), "%011lo", S_ISREG(mode) ? size : 0);
+       xsnprintf(header->size, sizeof(header->size), "%011"PRIoMAX , S_ISREG(mode) ? (uintmax_t)size : (uintmax_t)0);
        xsnprintf(header->mtime, sizeof(header->mtime), "%011lo", (unsigned long) args->time);
 
        xsnprintf(header->uid, sizeof(header->uid), "%07o", 0);
@@ -277,7 +277,7 @@ static int write_tar_entry(struct archiver_args *args,
                memcpy(header.name, path, pathlen);
 
        if (S_ISREG(mode) && !args->convert &&
-           oid_object_info(the_repository, oid, &size) == OBJ_BLOB &&
+           oid_object_info(args->repo, oid, &size) == OBJ_BLOB &&
            size > big_file_threshold)
                buffer = NULL;
        else if (S_ISLNK(mode) || S_ISREG(mode)) {