Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx> Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> --- object.c | 7 ++++--- object.h | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/object.c b/object.c index 3eb12bec49..9edddbe1d4 100644 --- a/object.c +++ b/object.c @@ -174,11 +174,12 @@ void *object_as_type(struct object *obj, enum object_type type, int quiet) } } -struct object *lookup_unknown_object_the_repository(const unsigned char *sha1) +struct object *lookup_unknown_object(struct repository *r, + const unsigned char *sha1) { - struct object *obj = lookup_object(the_repository, sha1); + struct object *obj = lookup_object(r, sha1); if (!obj) - obj = create_object(the_repository, sha1, + obj = create_object(r, sha1, alloc_object_node()); return obj; } diff --git a/object.h b/object.h index 083111d7b7..dd009a03ec 100644 --- a/object.h +++ b/object.h @@ -130,8 +130,7 @@ struct object *parse_object_or_die(const struct object_id *oid, const char *name struct object *parse_object_buffer(const struct object_id *oid, enum object_type type, unsigned long size, void *buffer, int *eaten_p); /** Returns the object, with potentially excess memory allocated. **/ -#define lookup_unknown_object(r, s) lookup_unknown_object_##r(s) -struct object *lookup_unknown_object_the_repository(const unsigned char *sha1); +struct object *lookup_unknown_object(struct repository *r, const unsigned char *sha1); struct object_list *object_list_insert(struct object *item, struct object_list **list_p); -- 2.15.1.433.g936d1b9894.dirty