From b67b55127c3eb2a44429f6b7071ce196794d14e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Mon, 13 Aug 2018 18:14:36 +0200 Subject: [PATCH] archive-*.c: use the right repository MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- archive-tar.c | 2 +- archive-zip.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/archive-tar.c b/archive-tar.c index 7df8565246..69ff23dfb0 100644 --- a/archive-tar.c +++ b/archive-tar.c @@ -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)) { diff --git a/archive-zip.c b/archive-zip.c index abc556e5a7..107da5f97e 100644 --- a/archive-zip.c +++ b/archive-zip.c @@ -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; -- 2.11.4.GIT