Skip to content

Commit 90e777f

Browse files
stefanbellergitster
authored andcommitted
replace-object: allow lookup_replace_object to handle arbitrary repositories
Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5643557 commit 90e777f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

replace-object.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ extern const struct object_id *do_lookup_replace_object(struct repository *r,
2323
* either sha1 or a pointer to a permanently-allocated value. When
2424
* object replacement is suppressed, always return sha1.
2525
*/
26-
#define lookup_replace_object(r, s) lookup_replace_object_##r(s)
27-
static inline const struct object_id *lookup_replace_object_the_repository(const struct object_id *oid)
26+
static inline const struct object_id *lookup_replace_object(struct repository *r,
27+
const struct object_id *oid)
2828
{
2929
if (!check_replace_refs ||
30-
(the_repository->objects->replace_map &&
31-
the_repository->objects->replace_map->map.tablesize == 0))
30+
(r->objects->replace_map &&
31+
r->objects->replace_map->map.tablesize == 0))
3232
return oid;
33-
return do_lookup_replace_object(the_repository, oid);
33+
return do_lookup_replace_object(r, oid);
3434
}
3535

3636
#endif /* REPLACE_OBJECT_H */

0 commit comments

Comments
 (0)