archive-*.c: use the right repository

With 'struct archive_args' gaining new repository pointer, we don't
have to assume the_repository in the archive backends anymore.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2018-08-13 18:14:36 +02:00 committed by Junio C Hamano
parent b612ee202a
commit b67b55127c
2 changed files with 2 additions and 2 deletions

View file

@ -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)) {

View file

@ -326,7 +326,7 @@ static int write_zip_entry(struct archiver_args *args,
compressed_size = 0;
buffer = NULL;
} else if (S_ISREG(mode) || S_ISLNK(mode)) {
enum object_type type = oid_object_info(the_repository, oid,
enum object_type type = oid_object_info(args->repo, oid,
&size);
method = 0;