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

Function retry_bad_packed_offset

packfile.c:1348–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1346}
1347
1348static 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

Callers 1

packed_to_object_typeFunction · 0.85

Calls 5

offset_to_pack_posFunction · 0.85
nth_packed_object_idFunction · 0.85
pack_pos_to_indexFunction · 0.85
mark_bad_packed_objectFunction · 0.85
odb_read_object_infoFunction · 0.85

Tested by

no test coverage detected