MCPcopy Index your code
hub / github.com/git/git / write_graph_chunk_generation_data

Function write_graph_chunk_generation_data

commit-graph.c:1353–1375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1351}
1352
1353static int write_graph_chunk_generation_data(struct hashfile *f,
1354 void *data)
1355{
1356 struct write_commit_graph_context *ctx = data;
1357 int i, num_generation_data_overflows = 0;
1358
1359 for (i = 0; i < ctx->commits.nr; i++) {
1360 struct commit *c = ctx->commits.items[i];
1361 timestamp_t offset;
1362 repo_parse_commit(ctx->r, c);
1363 offset = compute_generation_offset(c);
1364 display_progress(ctx->progress, ++ctx->progress_cnt);
1365
1366 if (offset > GENERATION_NUMBER_V2_OFFSET_MAX) {
1367 offset = CORRECTED_COMMIT_DATE_OFFSET_OVERFLOW | num_generation_data_overflows;
1368 num_generation_data_overflows++;
1369 }
1370
1371 hashwrite_be32(f, offset);
1372 }
1373
1374 return 0;
1375}
1376
1377static int write_graph_chunk_generation_data_overflow(struct hashfile *f,
1378 void *data)

Callers

nothing calls this directly

Calls 4

repo_parse_commitFunction · 0.85
display_progressFunction · 0.85
hashwrite_be32Function · 0.85

Tested by

no test coverage detected