From 17126cdf78dc7b8cbe6b35bc44cb74d8d0fb11ee Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 28 Jun 2018 18:22:08 -0700 Subject: blob: allow lookup_blob to handle arbitrary repositories Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- blob.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'blob.c') diff --git a/blob.c b/blob.c index 17b9314f0a..342bdbb1bb 100644 --- a/blob.c +++ b/blob.c @@ -5,13 +5,13 @@ const char *blob_type = "blob"; -struct blob *lookup_blob_the_repository(const struct object_id *oid) +struct blob *lookup_blob(struct repository *r, const struct object_id *oid) { - struct object *obj = lookup_object(the_repository, oid->hash); + struct object *obj = lookup_object(r, oid->hash); if (!obj) - return create_object(the_repository, oid->hash, - alloc_blob_node(the_repository)); - return object_as_type(the_repository, obj, OBJ_BLOB, 0); + return create_object(r, oid->hash, + alloc_blob_node(r)); + return object_as_type(r, obj, OBJ_BLOB, 0); } int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size) -- cgit v1.2.3