| 1261 | } |
| 1262 | |
| 1263 | int fsck_buffer(const struct object_id *oid, enum object_type type, |
| 1264 | const void *data, unsigned long size, |
| 1265 | struct fsck_options *options) |
| 1266 | { |
| 1267 | if (type == OBJ_BLOB) |
| 1268 | return fsck_blob(oid, data, size, options); |
| 1269 | if (type == OBJ_TREE) |
| 1270 | return fsck_tree(oid, data, size, options); |
| 1271 | if (type == OBJ_COMMIT) |
| 1272 | return fsck_commit(oid, data, size, options); |
| 1273 | if (type == OBJ_TAG) |
| 1274 | return fsck_tag(oid, data, size, options); |
| 1275 | |
| 1276 | return report(options, oid, type, |
| 1277 | FSCK_MSG_UNKNOWN_TYPE, |
| 1278 | "unknown type '%d' (internal fsck error)", |
| 1279 | type); |
| 1280 | } |
| 1281 | |
| 1282 | int fsck_objects_error_function(struct fsck_options *o, |
| 1283 | void *fsck_report, |
no test coverage detected