)]}'
{
  "commit": "b7b17ec8a6b1cb176206ad69c194b84eb3490b99",
  "tree": "1d2012951b83dc22686a7e7f7a9dcaff9041a844",
  "parents": [
    "8ff2eef8ada18c2d7ef61b1e8e13d53937524908"
  ],
  "author": {
    "name": "Karthik Nayak",
    "email": "karthik.188@gmail.com",
    "time": "Fri Nov 21 12:13:47 2025 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Wed Dec 10 20:59:58 2025 +0900"
  },
  "message": "fetch: fix failed batched updates skipping operations\n\nFix a regression introduced with batched updates in 0e358de64a (fetch:\nuse batched reference updates, 2025-05-19) when fetching references. In\nthe `do_fetch()` function, we jump to cleanup if committing the\ntransaction fails, regardless of whether using batched or atomic\nupdates. This skips three subsequent operations:\n\n  - Update \u0027FETCH_HEAD\u0027 as part of `commit_fetch_head()`.\n\n  - Add upstream tracking information via `set_upstream()`.\n\n  - Setting remote \u0027HEAD\u0027 values when `do_set_head` is true.\n\nFor atomic updates, this is expected behavior. For batched updates,\nwe want to continue with these operations even if some refs fail to\nupdate.\n\nSkipping `commit_fetch_head()` isn\u0027t actually a regression because\n\u0027FETCH_HEAD\u0027 is already updated via `append_fetch_head()` when not\nusing \u0027--atomic\u0027. However, we add a test to validate this behavior.\n\nSkipping the other two operations (upstream tracking and remote HEAD)\nis a regression. Fix this by only jumping to cleanup when using\n\u0027--atomic\u0027, allowing batched updates to continue with post-fetch\noperations. Add tests to prevent future regressions.\n\nHelped-by: Junio C Hamano \u003cgitster@pobox.com\u003e\nSigned-off-by: Karthik Nayak \u003ckarthik.188@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b19fa8e966df052926cdc2042515d240cf6bb674",
      "old_mode": 33188,
      "old_path": "builtin/fetch.c",
      "new_id": "74bf67349d30a0dbbd21459b905040642d0b4c4a",
      "new_mode": 33188,
      "new_path": "builtin/fetch.c"
    },
    {
      "type": "modify",
      "old_id": "f500cb83cad99734f6b9505477ba79a10c163c57",
      "old_mode": 33261,
      "old_path": "t/t5510-fetch.sh",
      "new_id": "ce1c23684ece388a41ebae44696b1a22ba47626b",
      "new_mode": 33261,
      "new_path": "t/t5510-fetch.sh"
    }
  ]
}
