path: root/pack-check.c
diff options
authorbrian m. carlson <>2018-03-12 02:27:39 (GMT)
committerJunio C Hamano <>2018-03-14 16:23:49 (GMT)
commit17e65451e305b7501fddec35125bf5d39a4cdcac (patch)
treeffd070759d814151fd56faebfa4a9b951eeaa240 /pack-check.c
parentd61d87bd156a1d49b827d1b26f023fd70febfa06 (diff)
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 <>
Diffstat (limited to 'pack-check.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/pack-check.c b/pack-check.c
index 8fc7dd1..d0591dd 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,
- 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) {