summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-06 22:10:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-08 06:12:57 (GMT)
commit3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4 (patch)
tree659abe824d500138947540b5217d142cac1a75f0 /object.c
parent3e9309815da9aab4e13195b7c6a52c1f7161562a (diff)
downloadgit-3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4.zip
git-3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4.tar.gz
git-3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4.tar.bz2
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>
Diffstat (limited to 'object.c')
-rw-r--r--object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/object.c b/object.c
index 0208c40..2c8d1e5 100644
--- a/object.c
+++ b/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);
}