Skip to content

Commit

Permalink
go/vcs: remove go.googlesource.com vcsPath entry
Browse files Browse the repository at this point in the history
This change synchronizes the absence of a special case entry for
go.googlesource.com import paths in cmd/go/internal/get to this
package. It seems it was added to x/tools/go/vcs in CL 180540043,
but it was never added to cmd/go/internal/get itself.

Having an go.googlesource.com entry here but not in cmd/go/internal/get
means the import path resolution logic diverges from that of the go
command, which is counter to the goal of this package.

After this change is applied, vcs.RepoRootForImportPathStatic reports
correct results for import paths like "go.googlesource.com/scratch.git"
(resolving it without an error) and "go.googlesource.com/scratch"
(reporting an error).

Updates golang/go#11490

Change-Id: I0b1c959675d9e20205a587a06d734fcd103ebf91
Reviewed-on: https://go-review.googlesource.com/c/159817
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
dmitshur committed Jan 28, 2019
1 parent 3c4dfba commit 0a99049
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions go/vcs/vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,15 +648,6 @@ func expand(match map[string]string, s string) string {

// vcsPaths lists the known vcs paths.
var vcsPaths = []*vcsPath{
// go.googlesource.com
{
prefix: "go.googlesource.com",
re: `^(?P<root>go\.googlesource\.com/[A-Za-z0-9_.\-]+/?)$`,
vcs: "git",
repo: "https://{root}",
check: noVCSSuffix,
},

// Github
{
prefix: "github.com/",
Expand Down

0 comments on commit 0a99049

Please sign in to comment.