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

Function name_compare

tree.c:154–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154int name_compare(const char *name1, size_t len1, const char *name2, size_t len2)
155{
156 size_t min_len = (len1 < len2) ? len1 : len2;
157 int cmp = memcmp(name1, name2, min_len);
158 if (cmp)
159 return cmp;
160 if (len1 < len2)
161 return -1;
162 if (len1 > len2)
163 return 1;
164 return 0;
165}
166
167struct tree *lookup_tree(struct repository *r, const struct object_id *oid)
168{

Callers 5

find_cache_posFunction · 0.85
check_entry_matchFunction · 0.85
traverse_treesFunction · 0.85
cmp_dir_entryFunction · 0.85
cache_name_stage_compareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected