summaryrefslogtreecommitdiff
path: root/blame.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2018-03-12 02:27:46 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-14 09:23:49 -0700
commitabef9020e3df87c441c9a3a95f592fce5fa49bb9 (patch)
treeb04714a271049de3d7402e20e868beb5cee30995 /blame.c
parentConvert remaining callers of sha1_object_info_extended to object_id (diff)
downloadtgif-abef9020e3df87c441c9a3a95f592fce5fa49bb9.tar.xz
sha1_file: convert sha1_object_info* to object_id
Convert sha1_object_info and sha1_object_info_extended to take pointers to struct object_id and rename them to use "oid" instead of "sha1" in their names. Update the declaration and definition and apply the following semantic patch, plus the standard object_id transforms: @@ expression E1, E2; @@ - sha1_object_info(E1.hash, E2) + oid_object_info(&E1, E2) @@ expression E1, E2; @@ - sha1_object_info(E1->hash, E2) + oid_object_info(E1, E2) @@ expression E1, E2, E3; @@ - sha1_object_info_extended(E1.hash, E2, E3) + oid_object_info_extended(&E1, E2, E3) @@ expression E1, E2, E3; @@ - sha1_object_info_extended(E1->hash, E2, E3) + oid_object_info_extended(E1, E2, E3) Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'blame.c')
-rw-r--r--blame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/blame.c b/blame.c
index 200e0ad9a2..00b97c1898 100644
--- a/blame.c
+++ b/blame.c
@@ -81,7 +81,7 @@ static void verify_working_tree_path(struct commit *work_tree, const char *path)
unsigned mode;
if (!get_tree_entry(commit_oid->hash, path, blob_oid.hash, &mode) &&
- sha1_object_info(blob_oid.hash, NULL) == OBJ_BLOB)
+ oid_object_info(&blob_oid, NULL) == OBJ_BLOB)
return;
}
@@ -506,7 +506,7 @@ static int fill_blob_sha1_and_mode(struct blame_origin *origin)
origin->path,
origin->blob_oid.hash, &origin->mode))
goto error_out;
- if (sha1_object_info(origin->blob_oid.hash, NULL) != OBJ_BLOB)
+ if (oid_object_info(&origin->blob_oid, NULL) != OBJ_BLOB)
goto error_out;
return 0;
error_out: