path: root/archive-zip.c
diff options
authorMatheus Tavares <>2020-01-30 20:32:20 (GMT)
committerJunio C Hamano <>2020-01-31 18:45:39 (GMT)
commitc8123e72f6d8bc4106afdd172895a28b0c30fb3b (patch)
tree1ef77451302c5474499799e27165304c3f13c6d3 /archive-zip.c
parent5ec9b8accd6591641115d692fe2e9c4b88019d97 (diff)
streaming: allow open_istream() to handle any repo
Some callers of open_istream() at archive-tar.c and archive-zip.c are capable of working on arbitrary repositories but the repo struct is not passed down to open_istream(), which uses the_repository internally. For now, that's not a problem since the said callers are only being called with the_repository. But to be consistent and avoid future problems, let's allow open_istream() to receive a struct repository and use that instead of the_repository. This parameter addition will also be used in a future patch to make sha1-file.c:check_object_signature() be able to work on arbitrary repos. Signed-off-by: Matheus Tavares <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'archive-zip.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/archive-zip.c b/archive-zip.c
index 11f5b19..e9f4262 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -345,7 +345,8 @@ static int write_zip_entry(struct archiver_args *args,
if (S_ISREG(mode) && type == OBJ_BLOB && !args->convert &&
size > big_file_threshold) {
- stream = open_istream(oid, &type, &size, NULL);
+ stream = open_istream(args->repo, oid, &type, &size,
+ NULL);
if (!stream)
return error(_("cannot stream blob %s"),