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

Function hasheq

hash.h:367–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367static inline int hasheq(const unsigned char *sha1, const unsigned char *sha2, const struct git_hash_algo *algop)
368{
369 /*
370 * We write this here instead of deferring to hashcmp so that the
371 * compiler can properly inline it and avoid calling memcmp.
372 */
373 if (algop->rawsz == GIT_MAX_RAWSZ)
374 return !memcmp(sha1, sha2, GIT_MAX_RAWSZ);
375 return !memcmp(sha1, sha2, GIT_SHA1_RAWSZ);
376}
377
378static inline void hashcpy(unsigned char *sha_dst, const unsigned char *sha_src,
379 const struct git_hash_algo *algop)

Callers 14

open_midx_bitmap_1Function · 0.85
verify_packfileFunction · 0.85
note_tree_findFunction · 0.85
add_graph_to_chainFunction · 0.85
open_packed_git_1Function · 0.85
hashfile_checksum_validFunction · 0.85
fixup_pack_header_footerFunction · 0.85
verify_hdrFunction · 0.85
verify_index_fromFunction · 0.85
read_eoie_extensionFunction · 0.85
parse_pack_objectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected