You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varvcsPaths= []*vcsPath{
// Github
{
prefix: "github.com/",
re: `^(?P<root>github\.com/[A-Za-z0-9_.\-]+/[A-Za-z0-9_.\-]+)(/[A-Za-z0-9_.\-]+)*$`,
vcs: "git",
repo: "https://{root}",
check: noVCSSuffix,
},
// Bitbucket
{
prefix: "bitbucket.org/",
re: `^(?P<root>bitbucket\.org/(?P<bitname>[A-Za-z0-9_.\-]+/[A-Za-z0-9_.\-]+))(/[A-Za-z0-9_.\-]+)*$`,
repo: "https://{root}",
check: bitbucketVCS,
},
// IBM DevOps Services (JazzHub)
{
prefix: "hub.jazz.net/git",
re: `^(?P<root>hub.jazz.net/git/[a-z0-9]+/[A-Za-z0-9_.\-]+)(/[A-Za-z0-9_.\-]+)*$`,
vcs: "git",
repo: "https://{root}",
check: noVCSSuffix,
},
// Git at Apache
{
prefix: "git.apache.org",
re: `^(?P<root>git.apache.org/[a-z0-9_.\-]+\.git)(/[A-Za-z0-9_.\-]+)*$`,
vcs: "git",
repo: "https://{root}",
},
// Git at OpenStack
{
prefix: "git.openstack.org",
re: `^(?P<root>git\.openstack\.org/[A-Za-z0-9_.\-]+/[A-Za-z0-9_.\-]+)(\.git)?(/[A-Za-z0-9_.\-]+)*$`,
vcs: "git",
repo: "https://{root}",
},
// General syntax for any server.// Must be last.
{
re: `^(?P<root>(?P<repo>([a-z0-9.\-]+\.)+[a-z0-9.\-]+(:[0-9]+)?(/~?[A-Za-z0-9_.\-]+)+?)\.(?P<vcs>bzr|git|hg|svn))(/~?[A-Za-z0-9_.\-]+)*$`,
ping: true,
},
}
Observe that e.g. GitHub has prefix github.com/ with a trailing slash, while Apache git has prefix git.apache.org with no trailing slash.
Having a trailing slash has the funny side-effect that go get github.com fetches https://github.com?go-get=1. (I can't imagine anyone does that often, though.) We should probably add trailing slashes instead of removing them, though, since they are required for a pattern match anyway.
I'll send a CL for 1.9 adding trailing slashes, unless anyone chimes in to the contrary.
The text was updated successfully, but these errors were encountered:
Excerpt from cmd/go/vcs.go:
Observe that e.g. GitHub has prefix
github.com/
with a trailing slash, while Apache git has prefixgit.apache.org
with no trailing slash.Having a trailing slash has the funny side-effect that
go get github.com
fetcheshttps://github.com?go-get=1
. (I can't imagine anyone does that often, though.) We should probably add trailing slashes instead of removing them, though, since they are required for a pattern match anyway.I'll send a CL for 1.9 adding trailing slashes, unless anyone chimes in to the contrary.
The text was updated successfully, but these errors were encountered: