1
0
mirror of https://github.com/golang/go synced 2024-10-01 03:38:32 -06:00
go/go/vcs
Dmitri Shuralyov 2d16b83fe9 go/vcs: ignore "mod" VCS type
golang.org/x/tools/go/vcs is significantly behind the upstream
cmd/go/internal/get code, and has no support for modules. It continues
to implement mechanics for GOPATH mode only.

This change is a minimal fix to get it to continue to work
in the presence of the module mode-only "mod" VCS type
(documented at https://golang.org/cmd/go/#hdr-Remote_import_paths)
by effectively implementing IgnoreMod ModuleMode behavior.

It is similar to issue golang/go#24751 and a small subset of CL 109340
that fixed it.

This helps with module adoption by reducing the harm of adding the
"mod" VCS type for vanity import paths, something that was meant to
be backwards compatible.

While here, also backport CL 14482 (the Token to RawToken change).

Fixes golang/go#31845
Updates golang/go#24751

Change-Id: I0852f52cb9bda56879f923337c7f361df8412845
Reviewed-on: https://go-review.googlesource.com/c/tools/+/175219
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-05-06 14:53:03 +00:00
..
discovery.go go/vcs: ignore "mod" VCS type 2019-05-06 14:53:03 +00:00
env.go go.tools: add go/vcs 2013-08-15 09:00:02 -07:00
http.go go.tools: add go/vcs 2013-08-15 09:00:02 -07:00
vcs_test.go go/vcs: ignore "mod" VCS type 2019-05-06 14:53:03 +00:00
vcs.go go/vcs: remove go.googlesource.com vcsPath entry 2019-01-28 23:20:29 +00:00