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

Function get_oid_hex_any

hex.c:43–51  ·  view source on GitHub ↗

* NOTE: This function relies on hash algorithms being in order from shortest * length to longest length. */

Source from the content-addressed store, hash-verified

41 * length to longest length.
42 */
43int get_oid_hex_any(const char *hex, struct object_id *oid)
44{
45 int i;
46 for (i = GIT_HASH_NALGOS - 1; i > 0; i--) {
47 if (!get_oid_hex_algop(hex, oid, &hash_algos[i]))
48 return i;
49 }
50 return GIT_HASH_UNKNOWN;
51}
52
53int get_oid_hex(const char *hex, struct object_id *oid)
54{

Callers 3

validate_headrefFunction · 0.85
parse_oid_hex_anyFunction · 0.85
read_mark_fileFunction · 0.85

Calls 1

get_oid_hex_algopFunction · 0.85

Tested by

no test coverage detected