Merge branch 'en/commit-graph-timestamp-fix' into jch

compute_reachable_generation_numbers() in commit-graph used a 32-bit
integer to accumulate parent generations, which is OK for generation
number v1 (topological levels), but with generation number v2
(adjusted committer timestamps), it truncated timestamps beyond
2106.  Fixed by widening the accumulator to timestamp_t.

* en/commit-graph-timestamp-fix:
  commit-graph: use timestamp_t for max parent generation accumulator
This commit is contained in:
Junio C Hamano
2026-06-17 05:40:01 -07:00
2 changed files with 10 additions and 1 deletions

View File

@@ -1669,7 +1669,7 @@ static void compute_reachable_generation_numbers(
struct commit *current = list->item;
struct commit_list *parent;
int all_parents_computed = 1;
uint32_t max_gen = 0;
timestamp_t max_gen = 0;
for (parent = current->parents; parent; parent = parent->next) {
repo_parse_commit(info->r, parent->item);