| 1346 | } |
| 1347 | |
| 1348 | static int retry_bad_packed_offset(struct repository *r, |
| 1349 | struct packed_git *p, |
| 1350 | off_t obj_offset) |
| 1351 | { |
| 1352 | int type; |
| 1353 | uint32_t pos; |
| 1354 | struct object_id oid; |
| 1355 | if (offset_to_pack_pos(p, obj_offset, &pos) < 0) |
| 1356 | return OBJ_BAD; |
| 1357 | nth_packed_object_id(&oid, p, pack_pos_to_index(p, pos)); |
| 1358 | mark_bad_packed_object(p, &oid); |
| 1359 | type = odb_read_object_info(r->objects, &oid, NULL); |
| 1360 | if (type <= OBJ_NONE) |
| 1361 | return OBJ_BAD; |
| 1362 | return type; |
| 1363 | } |
| 1364 | |
| 1365 | #define POI_STACK_PREALLOC 64 |
| 1366 |
no test coverage detected