Skip to content

Commit b67b551

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b612ee2 commit b67b551

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

archive-tar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static int write_tar_entry(struct archiver_args *args,
277277
memcpy(header.name, path, pathlen);
278278

279279
if (S_ISREG(mode) && !args->convert &&
280-
oid_object_info(the_repository, oid, &size) == OBJ_BLOB &&
280+
oid_object_info(args->repo, oid, &size) == OBJ_BLOB &&
281281
size > big_file_threshold)
282282
buffer = NULL;
283283
else if (S_ISLNK(mode) || S_ISREG(mode)) {

archive-zip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static int write_zip_entry(struct archiver_args *args,
326326
compressed_size = 0;
327327
buffer = NULL;
328328
} else if (S_ISREG(mode) || S_ISLNK(mode)) {
329-
enum object_type type = oid_object_info(the_repository, oid,
329+
enum object_type type = oid_object_info(args->repo, oid,
330330
&size);
331331

332332
method = 0;

0 commit comments

Comments
 (0)