| 2359 | }; |
| 2360 | |
| 2361 | static 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 | |
| 2384 | static int match_hash(unsigned len, const unsigned char *a, const unsigned char *b) |
| 2385 | { |
nothing calls this directly
no test coverage detected