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

Function anonymized_entry_cmp

builtin/fast-export.c:131–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129};
130
131static int anonymized_entry_cmp(const void *cmp_data UNUSED,
132 const struct hashmap_entry *eptr,
133 const struct hashmap_entry *entry_or_key,
134 const void *keydata)
135{
136 const struct anonymized_entry *a, *b;
137
138 a = container_of(eptr, const struct anonymized_entry, hash);
139 if (keydata) {
140 const struct anonymized_entry_key *key = keydata;
141 int equal = !xstrncmpz(a->orig, key->orig, key->orig_len);
142 return !equal;
143 }
144
145 b = container_of(entry_or_key, const struct anonymized_entry, hash);
146 return strcmp(a->orig, b->orig);
147}
148
149static struct anonymized_entry *add_anonymized_entry(struct hashmap *map,
150 unsigned hash,

Callers

nothing calls this directly

Calls 1

xstrncmpzFunction · 0.85

Tested by

no test coverage detected