)]}'
{
  "commit": "0cb6ad3c3d8e9c738686ef8dc6f173f725e509bc",
  "tree": "c218deb54009b1f59a959103a0390fc7d330f2a7",
  "parents": [
    "6e97ef31ce20ff93a4cc0e3c6ab5171fd6dda5f3"
  ],
  "author": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Jan 11 15:00:38 2011 -0500"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Jan 11 13:14:56 2011 -0800"
  },
  "message": "checkout: fix bug with ambiguous refs\n\nThe usual dwim_ref lookup prefers tags to branches. Because\ncheckout primarily works on branches, though, we switch that\nbehavior to prefer branches.\n\nHowever, there was a bug in the implementation in which we\nused lookup_commit_reference (which used the regular lookup\nrules) to get the actual commit to checkout. Checking out an\nambiguous ref therefore ended up putting us in an extremely\nbroken state in which we wrote the branch ref into HEAD, but\nactually checked out the tree for the tag.\n\nThis patch fixes the bug by always attempting to pull the\ncommit to be checked out from the branch-ified version of\nthe name we were given.\n\nPatch by Junio, tests and commit message from Jeff King.\n\nSigned-off-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a54583b3a4936b341820cf5c639e5647ce456a5a",
      "old_mode": 33188,
      "old_path": "builtin/checkout.c",
      "new_id": "953abdd0fae5345676806570951a325862148ebc",
      "new_mode": 33188,
      "new_path": "builtin/checkout.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "943541d40d7ea331dd0ae85624a33b9f2258246c",
      "new_mode": 33261,
      "new_path": "t/t2019-checkout-amiguous-ref.sh"
    }
  ]
}
