)]}'
{
  "commit": "ad74e02417f36e993aa5d1e497a29389f275986d",
  "tree": "e020b73184f81787ce877d9e696b889ecf0d5c37",
  "parents": [
    "4ec526671145224633e13e4359089385d03c5ee0"
  ],
  "author": {
    "name": "tsukasa inoue",
    "email": "inoue.tsukasa.4@gmail.com",
    "time": "Thu Oct 22 02:51:35 2026 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Oct 22 09:39:54 2026 -0700"
  },
  "message": "checkout: finish switching when the tracking config cannot be written\n\nWhen git switch -c \u003cnew\u003e \u003cremote\u003e/\u003cbranch\u003e (or checkout -b) cannot write\nthe tracking config, for example because .git/config.lock exists, the\nworktree, the index and the new branch ref have already been updated.\nGit then exits with status 1 while HEAD still points to the original\nbranch. The changes of the switch remain staged, and the post-checkout\nhook does not run.\n\ncreate_branch() now returns an error instead of exiting. Make checkout\nignore that error so that the switch completes and the command exits\nwith status 0. The error and the hint are still printed.\n\nMatch push -u, clone and fetch, which also print the error and continue.\nThe upstream can be set later with the command shown in the hint.\n\nKeep git branch \u003cnew\u003e \u003cstart\u003e failing when the tracking config cannot be\nwritten, so its behavior does not change; t3200 covers this. Making the\nswitch fully atomic, undoing the worktree, the index, the ref and the\nconfig when the tracking config fails, is a separate topic.\n\nSigned-off-by: tsukasa inoue \u003cinoue.tsukasa.4@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "13a2938b4258c8a823e9c588a346e5243efd3913",
      "old_mode": 33188,
      "old_path": "builtin/checkout.c",
      "new_id": "c5e2202026ef80ed7744833262612b64a3dc910e",
      "new_mode": 33188,
      "new_path": "builtin/checkout.c"
    },
    {
      "type": "modify",
      "old_id": "c01f1cd617c72b3e8386074100ef812c9db2f753",
      "old_mode": 33261,
      "old_path": "t/t2027-checkout-track.sh",
      "new_id": "c3be183bfcc411528d9deb43420462da4f532257",
      "new_mode": 33261,
      "new_path": "t/t2027-checkout-track.sh"
    },
    {
      "type": "modify",
      "old_id": "cec2fe6876c2fe1a98725602c32671106d4c325d",
      "old_mode": 33261,
      "old_path": "t/t2060-switch.sh",
      "new_id": "b4f137acc3b6fe7d6cf8e719099e0e17a0ef4f3a",
      "new_mode": 33261,
      "new_path": "t/t2060-switch.sh"
    },
    {
      "type": "modify",
      "old_id": "cdb6c6a6342a0c587142d3753562395a18a5d084",
      "old_mode": 33261,
      "old_path": "t/t3200-branch.sh",
      "new_id": "ca1a1c7f867eb323e56876147996037594397384",
      "new_mode": 33261,
      "new_path": "t/t3200-branch.sh"
    }
  ]
}
