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

Function remotes_hash_cmp

remote.c:114–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112};
113
114static int remotes_hash_cmp(const void *cmp_data UNUSED,
115 const struct hashmap_entry *eptr,
116 const struct hashmap_entry *entry_or_key,
117 const void *keydata)
118{
119 const struct remote *a, *b;
120 const struct remotes_hash_key *key = keydata;
121
122 a = container_of(eptr, const struct remote, ent);
123 b = container_of(entry_or_key, const struct remote, ent);
124
125 if (key)
126 return !!xstrncmpz(a->name, key->str, key->len);
127 else
128 return strcmp(a->name, b->name);
129}
130
131static struct remote *make_remote(struct remote_state *remote_state,
132 const char *name, int len)

Callers

nothing calls this directly

Calls 1

xstrncmpzFunction · 0.85

Tested by

no test coverage detected