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

Function path_to_oid

notes-merge.c:40–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static int path_to_oid(const char *path, struct object_id *oid)
41{
42 char hex_oid[GIT_MAX_HEXSZ];
43 int i = 0;
44 while (*path && i < the_hash_algo->hexsz) {
45 if (*path != '/')
46 hex_oid[i++] = *path;
47 path++;
48 }
49 if (*path || i != the_hash_algo->hexsz)
50 return -1;
51 return get_oid_hex(hex_oid, oid);
52}
53
54static int verify_notes_filepair(struct diff_filepair *p, struct object_id *oid)
55{

Callers 1

verify_notes_filepairFunction · 0.85

Calls 1

get_oid_hexFunction · 0.85

Tested by

no test coverage detected