Subject: [PATCH 15/19] replace-object: allow replace_object_pos to handle arbitrary repositories

From: Stefan Beller <[email-masked]>
Date: Fri, 6 Apr 2018 16:21:32 -0700

Signed-off-by: Jonathan Nieder <[email-masked]>
Signed-off-by: Stefan Beller <[email-masked]>
---
 replace-object.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/replace-object.c b/replace-object.c
index 944bcaf242..9272c7acbf 100644
--- a/replace-object.c
+++ b/replace-object.c
@@ -12,12 +12,10 @@ static const unsigned char *replace_sha1_access(size_t index, void *table)
 	return replace[index]->original;
 }
 
-#define replace_object_pos(r, s) \
-	replace_object_pos_##r(s)
-static int replace_object_pos_the_repository(const unsigned char *sha1)
+static int replace_object_pos(struct repository *r, const unsigned char *sha1)
 {
-	return sha1_pos(sha1,  the_repository->objects->replacements.items,
-			 the_repository->objects->replacements.nr,
+	return sha1_pos(sha1, r->objects->replacements.items,
+			r->objects->replacements.nr,
 			replace_sha1_access);
 }
 
-- 
2.17.0.484.g0c8726318c-goog