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

Function key_val_contains

t/unit-tests/u-oidmap.c:109–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static int key_val_contains(struct test_entry *entry, char seen[])
110{
111 for (size_t i = 0; i < ARRAY_SIZE(key_val); i++) {
112 struct object_id oid;
113
114 cl_parse_any_oid(key_val[i][0], &oid);
115
116 if (oideq(&entry->entry.oid, &oid)) {
117 if (seen[i])
118 return 2;
119 seen[i] = 1;
120 return 0;
121 }
122 }
123 return 1;
124}
125
126void test_oidmap__iterate(void)
127{

Callers 1

test_oidmap__iterateFunction · 0.70

Calls 2

cl_parse_any_oidFunction · 0.85
oideqFunction · 0.85

Tested by 1

test_oidmap__iterateFunction · 0.56