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

Function oidtree_each

oidtree.c:115–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115int oidtree_each(struct oidtree *ot, const struct object_id *prefix,
116 size_t prefix_hex_len, oidtree_each_cb cb, void *cb_data)
117{
118 struct oidtree_each_data data = {
119 .cb = cb,
120 .cb_data = cb_data,
121 .algo = prefix->algo,
122 };
123 size_t klen = prefix_hex_len / 2;
124 assert(prefix_hex_len <= GIT_MAX_HEXSZ);
125
126 if (prefix_hex_len & 1) {
127 data.last_byte = prefix->hash[klen];
128 data.last_nibble_at = &klen;
129 }
130
131 return cb_each(&ot->tree, prefix->hash, klen, iter, &data);
132}

Callers 4

check_eachFunction · 0.85
odb_source_inmemory_freeFunction · 0.85

Calls 1

cb_eachFunction · 0.85

Tested by

no test coverage detected