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

Function branches_hash_cmp

remote.c:207–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205};
206
207static int branches_hash_cmp(const void *cmp_data UNUSED,
208 const struct hashmap_entry *eptr,
209 const struct hashmap_entry *entry_or_key,
210 const void *keydata)
211{
212 const struct branch *a, *b;
213 const struct branches_hash_key *key = keydata;
214
215 a = container_of(eptr, const struct branch, ent);
216 b = container_of(entry_or_key, const struct branch, ent);
217
218 if (key)
219 return !!xstrncmpz(a->name, key->str, key->len);
220 else
221 return strcmp(a->name, b->name);
222}
223
224static struct branch *find_branch(struct remote_state *remote_state,
225 const char *name, size_t len)

Callers

nothing calls this directly

Calls 1

xstrncmpzFunction · 0.85

Tested by

no test coverage detected