Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx> --- object-store.h | 3 +-- sha1_file.c | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/object-store.h b/object-store.h index b4756444bb..f164c4e5c9 100644 --- a/object-store.h +++ b/object-store.h @@ -68,8 +68,7 @@ struct packed_git { * is overwritten each time the function is called. */ const char *sha1_file_name(struct repository *r, const unsigned char *sha1); -#define map_sha1_file(r, s, sz) map_sha1_file_##r(s, sz) -void *map_sha1_file_the_repository(const unsigned char *sha1, unsigned long *size); +extern void *map_sha1_file(struct repository *r, const unsigned char *sha1, unsigned long *size); void prepare_alt_odb(struct repository *r); diff --git a/sha1_file.c b/sha1_file.c index 86b0ca7089..6237d59a59 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -956,9 +956,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, -- 2.16.1.73.ga2c3e9663f.dirty