mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d61d87bd15
commit
17e65451e3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user