summaryrefslogtreecommitdiff
path: root/sha1-file.c
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2020-01-30 20:32:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-01-31 18:45:39 (GMT)
commitc8123e72f6d8bc4106afdd172895a28b0c30fb3b (patch)
tree1ef77451302c5474499799e27165304c3f13c6d3 /sha1-file.c
parent5ec9b8accd6591641115d692fe2e9c4b88019d97 (diff)
downloadgit-c8123e72f6d8bc4106afdd172895a28b0c30fb3b.zip
git-c8123e72f6d8bc4106afdd172895a28b0c30fb3b.tar.gz
git-c8123e72f6d8bc4106afdd172895a28b0c30fb3b.tar.bz2
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 <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1-file.c')
-rw-r--r--sha1-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1-file.c b/sha1-file.c
index 188de57..89ab986 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -986,7 +986,7 @@ int check_object_signature(const struct object_id *oid, void *map,
return !oideq(oid, &real_oid) ? -1 : 0;
}
- st = open_istream(oid, &obj_type, &size, NULL);
+ st = open_istream(the_repository, oid, &obj_type, &size, NULL);
if (!st)
return -1;