* Map the loose object at "path" if it is not NULL, or the path found by
* searching for a loose object named "sha1".
*/
-#define map_sha1_file_1(r, p, s, si) map_sha1_file_1_##r(p, s, si)
-static void *map_sha1_file_1_the_repository(const char *path,
- const unsigned char *sha1,
- unsigned long *size)
+static void *map_sha1_file_1(struct repository *r, const char *path,
+ const unsigned char *sha1, unsigned long *size)
{
void *map;
int fd;
if (path)
fd = git_open(path);
else
- fd = open_sha1_file(the_repository, sha1, &path);
+ fd = open_sha1_file(r, sha1, &path);
map = NULL;
if (fd >= 0) {
struct stat st;