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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
3e9309815d
commit
3aca1fc6c9
4
object.c
4
object.c
@ -190,7 +190,7 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t
|
||||
|
||||
obj = NULL;
|
||||
if (type == OBJ_BLOB) {
|
||||
struct blob *blob = lookup_blob(oid.hash);
|
||||
struct blob *blob = lookup_blob(&oid);
|
||||
if (blob) {
|
||||
if (parse_blob_buffer(blob, buffer, size))
|
||||
return NULL;
|
||||
@ -266,7 +266,7 @@ struct object *parse_object(const unsigned char *sha1)
|
||||
error("sha1 mismatch %s", sha1_to_hex(repl));
|
||||
return NULL;
|
||||
}
|
||||
parse_blob_buffer(lookup_blob(oid.hash), NULL, 0);
|
||||
parse_blob_buffer(lookup_blob(&oid), NULL, 0);
|
||||
return lookup_object(sha1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user