mirror of
https://github.com/golang/go
synced 2024-11-23 11:20:05 -07:00
cmd/go/internal/get: fix regexes for "any" character matching
This commit is contained in:
parent
ee59f6dff2
commit
75bd338569
@ -971,7 +971,7 @@ var vcsPaths = []*vcsPath{
|
||||
// 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_.\-]+)*$`,
|
||||
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,
|
||||
@ -980,7 +980,7 @@ var vcsPaths = []*vcsPath{
|
||||
// Git at Apache
|
||||
{
|
||||
prefix: "git.apache.org/",
|
||||
re: `^(?P<root>git.apache.org/[a-z0-9_.\-]+\.git)(/[A-Za-z0-9_.\-]+)*$`,
|
||||
re: `^(?P<root>git\.apache\.org/[a-z0-9_.\-]+\.git)(/[A-Za-z0-9_.\-]+)*$`,
|
||||
vcs: "git",
|
||||
repo: "https://{root}",
|
||||
},
|
||||
|
@ -59,6 +59,10 @@ func TestRepoRootForImportPath(t *testing.T) {
|
||||
"hub.jazz.net",
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"hubajazz.net",
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"hub2.jazz.net",
|
||||
nil,
|
||||
@ -140,6 +144,10 @@ func TestRepoRootForImportPath(t *testing.T) {
|
||||
"git.apache.org/package-name/path/to/lib",
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"gitbapache.org",
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"git.apache.org/package-name.git",
|
||||
&repoRoot{
|
||||
|
Loading…
Reference in New Issue
Block a user