)]}'
{
  "commit": "fbcc5408fcd60206234ba26cc103ef2757532ae0",
  "tree": "d458e47c7444bcbd517af8ac95225a4f8ab73c3e",
  "parents": [
    "9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed"
  ],
  "author": {
    "name": "Elijah Newren",
    "email": "newren@gmail.com",
    "time": "Sun Jun 14 06:57:50 2026 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sun Jun 14 08:24:08 2026 -0700"
  },
  "message": "commit-graph: use timestamp_t for max parent generation accumulator\n\ncompute_reachable_generation_numbers() computes each commit\u0027s\ngeneration as\n\n    max(c-\u003edate, max(parent.generation)) + 1\n\nby walking its parents and accumulating their generations into a\nlocal\n\n    uint32_t max_gen \u003d 0;\n\nwhile info-\u003eget_generation() returns timestamp_t and\ncompute_generation_from_max() already takes its max_gen parameter\nas timestamp_t.  For v1 (topological levels) the narrowing is\nharmless because GENERATION_NUMBER_V1_MAX is less than 2^30, but\nfor v2 (corrected committer dates) it silently truncates any\nparent generation that does not fit in 32 bits, i.e. any parent\nwhose committer timestamp is at or beyond 2106-02-07 UTC\n(\u003e\u003d 2^32).\n\nThe truncated max then causes child commits to end up with a\ncorrected committer date that matches the parent\u0027s instead of being\nat least 1 higher.  The bad value gets written into the commit-graph\nand causes problems later, and can be noticed by running `git\ncommit-graph verify`.\n\nWiden the accumulator to timestamp_t.\n\nThis is solely an in-memory arithmetic fix with no on-disk format\nchange: the on-disk format already encodes timestamp_t values and\nexisting readers handle them unchanged.  This merely allows the code to\ncompute the correct value to write to disk.\n\nThe narrowing was introduced in 80c928d947c2 (commit-graph:\nsimplify compute_generation_numbers(), 2023-03-20), which rewired\nv2 to use the shared compute_reachable_generation_numbers()\nhelper; the helper\u0027s local accumulator had been declared uint32_t\nin the immediately preceding 368d19b0b7fa (commit-graph: refactor\ncompute_topological_levels(), 2023-03-20) when only v1 was using\nit, where it was harmless.\n\nAdd a new test with a future-dated parent and a present-day child;\nwithout the above fix, `git commit-graph verify` reports the\ndescendant\u0027s stored generation as below parent + 1.\n\nSigned-off-by: Elijah Newren \u003cnewren@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "474454db73d0946cba4e00ef3762263bd95252b6",
      "old_mode": 33188,
      "old_path": "commit-graph.c",
      "new_id": "ad0e5d13b15009deca0822db6cd950a0c51cd600",
      "new_mode": 33188,
      "new_path": "commit-graph.c"
    },
    {
      "type": "modify",
      "old_id": "d8891e6a9224637b222f1111031fca04dfa14055",
      "old_mode": 33261,
      "old_path": "t/t5328-commit-graph-64bit-time.sh",
      "new_id": "bc651b69deeea4e96d29105a6b1e32d19d3618c3",
      "new_mode": 33261,
      "new_path": "t/t5328-commit-graph-64bit-time.sh"
    }
  ]
}
