From c8123e72f6d8bc4106afdd172895a28b0c30fb3b Mon Sep 17 00:00:00 2001 From: Matheus Tavares Date: Thu, 30 Jan 2020 17:32:20 -0300 Subject: 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 --- streaming.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'streaming.h') diff --git a/streaming.h b/streaming.h index f465a3cd31..5e4e6acfd0 100644 --- a/streaming.h +++ b/streaming.h @@ -8,7 +8,9 @@ /* opaque */ struct git_istream; -struct git_istream *open_istream(const struct object_id *, enum object_type *, unsigned long *, struct stream_filter *); +struct git_istream *open_istream(struct repository *, const struct object_id *, + enum object_type *, unsigned long *, + struct stream_filter *); int close_istream(struct git_istream *); ssize_t read_istream(struct git_istream *, void *, size_t); -- cgit v1.3