)]}'
{
  "commit": "2e09c01232b1e1f5f383e62865b6049ff76270b3",
  "tree": "6f5b57576597e432ef4f501e7048ef435d5b6a49",
  "parents": [
    "5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9"
  ],
  "author": {
    "name": "SZEDER Gábor",
    "email": "szeder.dev@gmail.com",
    "time": "Tue Sep 24 09:32:13 2019 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sat Sep 28 13:36:04 2019 +0900"
  },
  "message": "name-rev: avoid cutoff timestamp underflow\n\nWhen \u0027git name-rev\u0027 is invoked with commit-ish parameters, it tries to\nsave some work, and doesn\u0027t visit commits older than the committer\ndate of the oldest given commit minus a one day worth of slop.  Since\nour \u0027timestamp_t\u0027 is an unsigned type, this leads to a timestamp\nunderflow when the committer date of the oldest given commit is within\na day of the UNIX epoch.  As a result the cutoff timestamp ends up\nfar-far in the future, and \u0027git name-rev\u0027 doesn\u0027t visit any commits,\nand names each given commit as \u0027undefined\u0027.\n\nCheck whether subtracting the slop from the oldest committer date\nwould lead to an underflow, and use no cutoff in that case.  We don\u0027t\nhave a TIME_MIN constant, dddbad728c (timestamp_t: a new data type for\ntimestamps, 2017-04-26) didn\u0027t add one, so do it now.\n\nNote that the type of the cutoff timestamp variable used to be signed\nbefore 5589e87fd8 (name-rev: change a \"long\" variable to timestamp_t,\n2017-05-20).  The behavior was still the same even back then, but the\nunderflow didn\u0027t happen when substracting the slop from the oldest\ncommitter date, but when comparing the signed cutoff timestamp with\nunsigned committer dates in name_rev().  IOW, this underflow bug is as\nold as \u0027git name-rev\u0027 itself.\n\nHelped-by: Johannes Sixt \u003cj6t@kdbg.org\u003e\nSigned-off-by: SZEDER Gábor \u003cszeder.dev@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c785fe16bade1a67d4da782d91b61bdd61d99115",
      "old_mode": 33188,
      "old_path": "builtin/name-rev.c",
      "new_id": "b0f0776947f05e551f5bd06a4a0e291aa19a56f3",
      "new_mode": 33188,
      "new_path": "builtin/name-rev.c"
    },
    {
      "type": "modify",
      "old_id": "83be89de0aac7c96799635e3b2858a465f440acf",
      "old_mode": 33188,
      "old_path": "git-compat-util.h",
      "new_id": "2e253567fbb8045124f4dcafa051ab048867223d",
      "new_mode": 33188,
      "new_path": "git-compat-util.h"
    },
    {
      "type": "modify",
      "old_id": "2b883d8174036b7d2246fcd89f239d7ecde049d4",
      "old_mode": 33261,
      "old_path": "t/t6120-describe.sh",
      "new_id": "45047d0a724e6bb7b59b4b3ae155ced530c660d1",
      "new_mode": 33261,
      "new_path": "t/t6120-describe.sh"
    }
  ]
}
