MCPcopy Index your code
hub / github.com/git/git / packfile_store_for_each_object_wrapper

Function packfile_store_for_each_object_wrapper

packfile.c:2361–2382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2359};
2360
2361static int packfile_store_for_each_object_wrapper(const struct object_id *oid,
2362 struct packed_git *pack,
2363 uint32_t index_pos,
2364 void *cb_data)
2365{
2366 struct packfile_store_for_each_object_wrapper_data *data = cb_data;
2367
2368 if (data->request) {
2369 off_t offset = nth_packed_object_offset(pack, index_pos);
2370 struct object_info oi = *data->request;
2371
2372 if (packed_object_info_with_index_pos(pack, offset,
2373 &index_pos, &oi) < 0) {
2374 mark_bad_packed_object(pack, oid);
2375 return -1;
2376 }
2377
2378 return data->cb(oid, &oi, data->cb_data);
2379 } else {
2380 return data->cb(oid, NULL, data->cb_data);
2381 }
2382}
2383
2384static int match_hash(unsigned len, const unsigned char *a, const unsigned char *b)
2385{

Callers

nothing calls this directly

Calls 3

nth_packed_object_offsetFunction · 0.85
mark_bad_packed_objectFunction · 0.85

Tested by

no test coverage detected