summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-04-12 00:21:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-12 02:38:57 (GMT)
commit90e777f1e20dd6bdc022d5720a9169ea2205d9ad (patch)
treeaef4f2db66c2281424cffc7999776a239daa390b
parent5643557e63de2cd0b81297fe975b001fa5be2c0a (diff)
downloadgit-90e777f1e20dd6bdc022d5720a9169ea2205d9ad.zip
git-90e777f1e20dd6bdc022d5720a9169ea2205d9ad.tar.gz
git-90e777f1e20dd6bdc022d5720a9169ea2205d9ad.tar.bz2
replace-object: allow lookup_replace_object to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--replace-object.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/replace-object.h b/replace-object.h
index f05354c..f996de3 100644
--- a/replace-object.h
+++ b/replace-object.h
@@ -23,14 +23,14 @@ extern const struct object_id *do_lookup_replace_object(struct repository *r,
* either sha1 or a pointer to a permanently-allocated value. When
* object replacement is suppressed, always return sha1.
*/
-#define lookup_replace_object(r, s) lookup_replace_object_##r(s)
-static inline const struct object_id *lookup_replace_object_the_repository(const struct object_id *oid)
+static inline const struct object_id *lookup_replace_object(struct repository *r,
+ const struct object_id *oid)
{
if (!check_replace_refs ||
- (the_repository->objects->replace_map &&
- the_repository->objects->replace_map->map.tablesize == 0))
+ (r->objects->replace_map &&
+ r->objects->replace_map->map.tablesize == 0))
return oid;
- return do_lookup_replace_object(the_repository, oid);
+ return do_lookup_replace_object(r, oid);
}
#endif /* REPLACE_OBJECT_H */