)]}'
{
  "commit": "d4e21288e444d3ffd30d1a0737f15ea3fc3b8ad9",
  "tree": "7d01cf85857466335c5db227860ba41b0a88fe15",
  "parents": [
    "b9ecac03cb8084bb24c9a75e0f02e164292bb427"
  ],
  "author": {
    "name": "Russ Cox",
    "email": "rsc@golang.org",
    "time": "Wed Apr 25 11:06:41 2018 -0400"
  },
  "committer": {
    "name": "Russ Cox",
    "email": "rsc@golang.org",
    "time": "Wed May 30 18:03:08 2018 +0000"
  },
  "message": "cmd/go: add minimal module-awareness for legacy operation\n\nWe want authors to be able to publish code that works with both\nthe current standard go command and the planned new go command\nsupport for modules. If authors have tagged their code v2 or later,\nsemantic import versioning means the import paths must include a\nv2 path element after the path prefix naming the module.\nOne option for making this convention compatible with original go get\nis to move code into a v2 subdirectory of the root.\nThat makes sense for some authors, but many authors would prefer\nnot to move all the code into a v2 subdirectory for a transition and\nthen move it back up once we everyone has a module-aware go command.\n\nInstead, this CL teaches the old (non-module-aware) go command\na tiny amount about modules and their import paths, to expand\nthe options for authors who want to publish compatible packages.\nIf an author has a v2 of a package, say my/thing/v2/sub/pkg,\nin the my/thing repo\u0027s sub/pkg subdirectory (no v2 in the file system path),\nthen old go get continues to import that package as my/thing/sub/pkg.\nBut when go get is processing code in any module (code in a tree with\na go.mod file) and encounters a path like my/thing/v2/sub/pkg,\nit will check to see if my/thing/go.mod says \"module my/thing/v2\".\nIf so, the go command will read the import my/thing/v2/sub/pkg\nas if it said my/thing/sub/pkg, which is the correct \"old\" import path\nfor the package in question.\n\nThis CL will be back-ported to Go 1.10 and Go 1.9 as well.\n\nOnce users have updated to the latest Go point releases containing\nthis new logic, authors will be able to update to using modules\nwithin their own repos, including using semantic import paths\nwith vN path elements, and old go get will still be able to consume\nthose repositories.\n\nThis CL also makes \"go get\" ignore meta go-import lines using\nthe new \"mod\" VCS type. This allows a package to specify both\na \"mod\" type and a \"git\" type, to present more efficient module\naccess to module-aware go but still present a Git repo to the old\n\"go get\".\n\nFixes #24751.\nFixes #25069.\n\nChange-Id: I378955613a0d63834d4f50f121f4db7e4d87dc0a\nReviewed-on: https://go-review.googlesource.com/109340\nRun-TryBot: Russ Cox \u003crsc@golang.org\u003e\nTryBot-Result: Gobot Gobot \u003cgobot@golang.org\u003e\nReviewed-by: Bryan C. Mills \u003cbcmills@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b2918dbb4f31aaa4488856e68113fee8efecdf2c",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/get/discovery.go",
      "new_id": "97aa1d7e8d6344d2061c01f1de48966ffc24f000",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/get/discovery.go"
    },
    {
      "type": "modify",
      "old_id": "733116eca04d83d8c5d1267d6931c1e33c32a67b",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/get/get.go",
      "new_id": "610c5407e9e249fd052ec3e613922fb9bc5b7aef",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/get/get.go"
    },
    {
      "type": "modify",
      "old_id": "b8937a57ec9122d036edfe559c297c9ca4e9c8dc",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/get/pkg_test.go",
      "new_id": "1179d86693acee898af4fb29fe989565f1107ac0",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/get/pkg_test.go"
    },
    {
      "type": "modify",
      "old_id": "5b242a887a2d87b07bd57bcb0bf2bf770ba20d02",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/list/list.go",
      "new_id": "70bbf4bf3291b49ba30363c2404f7c0ade12a9d9",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/list/list.go"
    },
    {
      "type": "modify",
      "old_id": "5a26ca7892a23a2dbae7168ec2af4db7bf27e6e3",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/load/pkg.go",
      "new_id": "dd8d18056cb1311dbae0d6887ac4a379f6c01023",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/load/pkg.go"
    },
    {
      "type": "modify",
      "old_id": "a9b47ce72dc40560080f14c02edeb643efdf17b1",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/load/test.go",
      "new_id": "1444ddb58a40f2bc2418491b24dcdceed4dfd32d",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/load/test.go"
    },
    {
      "type": "modify",
      "old_id": "bcff5ff3b164dd3194663aeef1416bacf7062172",
      "old_mode": 33188,
      "old_path": "src/cmd/go/internal/test/test.go",
      "new_id": "585481b6b717dbdf22cd7d93ef740a8b4d23f325",
      "new_mode": 33188,
      "new_path": "src/cmd/go/internal/test/test.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d0dd46d314c6a3b7d81265586d3b268526c968f7",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/new/go.mod"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e99c47a6a8411f729644a051063dec6785cb8130",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/new/new.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4539f4091965364225880baad21cfd2fb3e90b42",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/new/p1/p1.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9b9052f54197e6ea3c7136cf4088e442c8db0434",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/new/p2/p2.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "484d20c6b2ea507a5cbf694c38d99307109c3bf2",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/new/sub/go.mod"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ba3934541f745ff3f64cc2d019696dafc281bb5d",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/new/sub/inner/go.mod"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "823aafd0712b6c533df84b17d9b7ac6ae43e66fa",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/new/sub/inner/x/x.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "789ca715ec46017ace27f1f85e8dce8eb3fdae47",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/new/sub/x/v1/y/y.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "90527483abf2c2c850396dcd5315edd62490d13a",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/old/p1/p1.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9b9052f54197e6ea3c7136cf4088e442c8db0434",
      "new_mode": 33188,
      "new_path": "src/cmd/go/testdata/modlegacy/src/old/p2/p2.go"
    },
    {
      "type": "modify",
      "old_id": "4f21a510a3cff765fd502b6b7df2dde0ac0f96cd",
      "old_mode": 33188,
      "old_path": "src/cmd/go/vendor_test.go",
      "new_id": "e30fc65d80457799ed5489f26972d97bca162dfa",
      "new_mode": 33188,
      "new_path": "src/cmd/go/vendor_test.go"
    }
  ]
}
