)]}'
{
  "commit": "fa4d9b8e2bc2612960c80474fca83a4c85a974eb",
  "tree": "1f9ed0e085560293799a223b9e1018681588f483",
  "parents": [
    "b00447038a50e0923b12cb0bc3c28f6b842a7f54"
  ],
  "author": {
    "name": "Bryan C. Mills",
    "email": "bcmills@google.com",
    "time": "Thu Jan 13 15:38:14 2022 -0500"
  },
  "committer": {
    "name": "Bryan Mills",
    "email": "bcmills@google.com",
    "time": "Thu Feb 03 16:42:26 2022 +0000"
  },
  "message": "cmd/go/internal/modfetch: do not short-circuit canonical versions\n\nSince at least CL 121857, the conversion logic in\n(*modfetch).codeRepo.Stat has had a short-circuit to use the version\nrequested by the caller if it successfully resolves and is already\ncanonical.\n\nHowever, we should not use that version if it refers to a branch\ninstead of a tag, because branches (unlike tags) usually do not refer\nto a single, stable release: a branch named \"v1.0.0\" may be for the\ndevelopment of the v1.0.0 release, or for the development of patches\nbased on v1.0.0, but only one commit (perhaps at the end of that\nbranch — but possibly not even written yet!) can be that specific\nversion.\n\nWe already have some logic to prefer tags that are semver-equivalent\nto the version requested by the caller. That more general case\nsuffices for exact equality too — so we can eliminate the\nspecial-case, fixing the bug and (happily!) also somewhat simplifying\nthe code.\n\nFixes #35671\nUpdates #41512\n\nChange-Id: I2fd290190b8a99a580deec7e26d15659b58a50b0\nReviewed-on: https://go-review.googlesource.com/c/go/+/378400\nTrust: Bryan Mills \u003cbcmills@google.com\u003e\nRun-TryBot: Bryan Mills \u003cbcmills@google.com\u003e\nReviewed-by: Russ Cox \u003crsc@golang.org\u003e\nTryBot-Result: Gopher Robot \u003cgobot@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "79da010809b7407b12e2a1a823abb7ee3c022cce",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/modfetch/coderepo.go",
      "new_id": "2206c7c8401451a87bdb935e4eb9a3133e7d4381",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/modfetch/coderepo.go"
    },
    {
      "type": "modify",
      "old_id": "02e399f35259597f1edc53d2ea4c6734a2b0ca67",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/modfetch/coderepo_test.go",
      "new_id": "d98ea87da2c3dfe36a7448eee0ca3cc087784a75",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/modfetch/coderepo_test.go"
    },
    {
      "type": "modify",
      "old_id": "428b8aa60e6f8827b32bc424e685c815bc91ccde",
      "old_mode": 33188,
      "old_path": "src/cmd/go/testdata/script/mod_invalid_version.txt",
      "new_id": "8385b08d95f105c061e2b395705f55cbd2016e7b",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/script/mod_invalid_version.txt"
    }
  ]
}
