From 17e65451e305b7501fddec35125bf5d39a4cdcac Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Mon, 12 Mar 2018 02:27:39 +0000 Subject: sha1_file: convert check_sha1_signature to struct object_id Convert this function to take a pointer to struct object_id and rename it check_object_signature. Introduce temporaries to convert the return values of lookup_replace_object and lookup_replace_object_extended into struct object_id. The temporaries are needed because in order to convert lookup_replace_object, open_istream needs to be converted, and open_istream needs check_sha1_signature to be converted, causing a loop of dependencies. The temporaries will be removed in a future patch. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- pack-check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pack-check.c') diff --git a/pack-check.c b/pack-check.c index 8fc7dd1694..d0591dd5e8 100644 --- a/pack-check.c +++ b/pack-check.c @@ -126,7 +126,7 @@ static int verify_packfile(struct packed_git *p, if (type == OBJ_BLOB && big_file_threshold <= size) { /* - * Let check_sha1_signature() check it with + * Let check_object_signature() check it with * the streaming interface; no point slurping * the data in-core only to discard. */ @@ -141,7 +141,7 @@ static int verify_packfile(struct packed_git *p, err = error("cannot unpack %s from %s at offset %"PRIuMAX"", oid_to_hex(entries[i].oid.oid), p->pack_name, (uintmax_t)entries[i].offset); - else if (check_sha1_signature(entries[i].oid.hash, data, size, type_name(type))) + else if (check_object_signature(entries[i].oid.oid, data, size, type_name(type))) err = error("packed %s from %s is corrupt", oid_to_hex(entries[i].oid.oid), p->pack_name); else if (fn) { -- cgit v1.2.3