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

Function write_graph_chunk_bloom_data

commit-graph.c:1487–1511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1485}
1486
1487static 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
1513static int add_packed_commits_oi(const struct object_id *oid,
1514 struct object_info *oi,

Callers

nothing calls this directly

Calls 5

hashwrite_be32Function · 0.85
get_bloom_filterFunction · 0.85
display_progressFunction · 0.85
hashwriteFunction · 0.85

Tested by

no test coverage detected