MCPcopy Index your code
hub / github.com/git/git / hash_obj

Function hash_obj

object.c:66–69  ·  view source on GitHub ↗

* Return a numerical hash value between 0 and n-1 for the object with * the specified sha1. n must be a power of 2. Please note that the * return value is *not* consistent across computer architectures. */

Source from the content-addressed store, hash-verified

64 * return value is *not* consistent across computer architectures.
65 */
66static unsigned int hash_obj(const struct object_id *oid, unsigned int n)
67{
68 return oidhash(oid) & (n - 1);
69}
70
71/*
72 * Insert obj into the hash table hash, which has length size (which

Callers 2

insert_obj_hashFunction · 0.70
lookup_objectFunction · 0.70

Calls 1

oidhashFunction · 0.85

Tested by

no test coverage detected