MCPcopy Create free account
hub / github.com/git/git / check_object_signature

Function check_object_signature

object-file.c:101–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101int 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
114int stream_object_signature(struct repository *r,
115 struct odb_read_stream *st,

Callers 5

verify_packfileFunction · 0.85
parse_object_with_flagsFunction · 0.85
export_blobFunction · 0.85
fix_unresolved_deltasFunction · 0.85
verify_object_in_tagFunction · 0.85

Calls 2

hash_object_fileFunction · 0.85
oideqFunction · 0.85

Tested by

no test coverage detected