From 3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sat, 6 May 2017 22:10:14 +0000 Subject: Convert lookup_blob to struct object_id Convert lookup_blob to take a pointer to struct object_id. The commit was created with manual changes to blob.c and blob.h, plus the following semantic patch: @@ expression E1; @@ - lookup_blob(E1.hash) + lookup_blob(&E1) @@ expression E1; @@ - lookup_blob(E1->hash) + lookup_blob(E1) Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- blob.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'blob.c') diff --git a/blob.c b/blob.c index 1fcb8e44b0..fa2ab4f7a7 100644 --- a/blob.c +++ b/blob.c @@ -3,11 +3,11 @@ const char *blob_type = "blob"; -struct blob *lookup_blob(const unsigned char *sha1) +struct blob *lookup_blob(const struct object_id *oid) { - struct object *obj = lookup_object(sha1); + struct object *obj = lookup_object(oid->hash); if (!obj) - return create_object(sha1, alloc_blob_node()); + return create_object(oid->hash, alloc_blob_node()); return object_as_type(obj, OBJ_BLOB, 0); } -- cgit v1.2.3