diff options
author | Stefan Beller <sbeller@google.com> | 2018-03-23 20:21:20 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-26 20:05:55 +0300 |
commit | bd27f50c801410433542a31122985b7d808b0a7f (patch) | |
tree | cc72707cf48d8190900a4b7dc81f85e828cc0e1c /sha1_file.c | |
parent | 1fea63e1da74b875790e8f2c63119c79fc5b52a6 (diff) |
sha1_file: allow map_sha1_file to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c index 1d5d23dfe2..9addad6887 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -957,9 +957,10 @@ static void *map_sha1_file_1(struct repository *r, const char *path, return map; } -void *map_sha1_file_the_repository(const unsigned char *sha1, unsigned long *size) +void *map_sha1_file(struct repository *r, + const unsigned char *sha1, unsigned long *size) { - return map_sha1_file_1(the_repository, NULL, sha1, size); + return map_sha1_file_1(r, NULL, sha1, size); } static int unpack_sha1_short_header(git_zstream *stream, |