)]}'
{
  "commit": "38bdda17dd33e42193f1b3b7e91797d5c03145d4",
  "tree": "5879899d57af62827ff3553d0f6f5d23eeef5ca0",
  "parents": [
    "e9019fcafe0040228b8631c30f97ae1adb61bcdc"
  ],
  "author": {
    "name": "Jiri Kuncar",
    "email": "jiri.kuncar@gmail.com",
    "time": "Mon Sep 21 14:32:46 2026 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Sep 21 17:18:57 2026 -0700"
  },
  "message": "pull: avoid segfault when commit lookup fails\n\nget_can_ff() and already_up_to_date() pass the result of\nlookup_commit_reference() straight to commit_list_insert() and\nrepo_is_descendant_of() without checking it.  When the object\nbehind HEAD or one of the merge heads cannot be parsed, e.g. because\na loose object was left truncated by a fetch or gc racing on the\nsame repository, lookup_commit_reference() returns NULL and\n\"git pull\" segfaults instead of reporting the corruption.\n\nTreat a failed lookup as \"cannot fast-forward\" and \"not up to date\",\nso that the caller falls through to the normal merge path, which\nalready diagnoses the broken object and fails cleanly.\n\nAn alternative would be to report the breakage at each lookup site,\nwhich could give a more precise diagnosis.  The minimal guards are\npreferred because they do no more than is needed to avoid the\ncrash, and will be easy to drop once \"git pull\" is reworked to\nresolve object names into commit objects early and pass those\naround, at which point there will not be multiple lookups of the\nsame object name to guard in the first place.\n\nThe test corrupts the loose object in place rather than removing\nit: a missing object that is still recorded in the commit-graph is\ncaught by the consistency check in fetch-pack before \"git pull\"\nreaches the fast-forward check, so removing it would not exercise\nthe crash.\n\nSigned-off-by: Jiri Kuncar \u003cjiri.kuncar@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d49b09114ae7d8ff052e3fa34175f7e90f7dcb4d",
      "old_mode": 33188,
      "old_path": "builtin/pull.c",
      "new_id": "4336088178d4cef158bbf7730b25c019d431449b",
      "new_mode": 33188,
      "new_path": "builtin/pull.c"
    },
    {
      "type": "modify",
      "old_id": "0e0019347e85e9949fe6c2c63b9f86f6c4ce4519",
      "old_mode": 33261,
      "old_path": "t/t5520-pull.sh",
      "new_id": "5d018dbec36d9cec8cea5032594d4fe0bf4260e0",
      "new_mode": 33261,
      "new_path": "t/t5520-pull.sh"
    }
  ]
}
