| 99 | } |
| 100 | |
| 101 | int check_object_signature(struct repository *r, const struct object_id *oid, |
| 102 | void *buf, unsigned long size, |
| 103 | enum object_type type) |
| 104 | { |
| 105 | const struct git_hash_algo *algo = |
| 106 | oid->algo ? &hash_algos[oid->algo] : r->hash_algo; |
| 107 | struct object_id real_oid; |
| 108 | |
| 109 | hash_object_file(algo, buf, size, type, &real_oid); |
| 110 | |
| 111 | return !oideq(oid, &real_oid) ? -1 : 0; |
| 112 | } |
| 113 | |
| 114 | int stream_object_signature(struct repository *r, |
| 115 | struct odb_read_stream *st, |
no test coverage detected