| 1485 | } |
| 1486 | |
| 1487 | static int write_graph_chunk_bloom_data(struct hashfile *f, |
| 1488 | void *data) |
| 1489 | { |
| 1490 | struct write_commit_graph_context *ctx = data; |
| 1491 | struct commit **list = ctx->commits.items; |
| 1492 | struct commit **last = ctx->commits.items + ctx->commits.nr; |
| 1493 | |
| 1494 | trace2_bloom_filter_settings(ctx); |
| 1495 | |
| 1496 | hashwrite_be32(f, ctx->bloom_settings->hash_version); |
| 1497 | hashwrite_be32(f, ctx->bloom_settings->num_hashes); |
| 1498 | hashwrite_be32(f, ctx->bloom_settings->bits_per_entry); |
| 1499 | |
| 1500 | while (list < last) { |
| 1501 | struct bloom_filter *filter = get_bloom_filter(ctx->r, *list); |
| 1502 | size_t len = filter ? filter->len : 0; |
| 1503 | |
| 1504 | display_progress(ctx->progress, ++ctx->progress_cnt); |
| 1505 | if (len) |
| 1506 | hashwrite(f, filter->data, len * sizeof(unsigned char)); |
| 1507 | list++; |
| 1508 | } |
| 1509 | |
| 1510 | return 0; |
| 1511 | } |
| 1512 | |
| 1513 | static int add_packed_commits_oi(const struct object_id *oid, |
| 1514 | struct object_info *oi, |
nothing calls this directly
no test coverage detected