mirror of https://github.com/golang/go.git
cmd/go: allow ~ as first char of path element in general git import paths
This makes go get gitserver/~user/repo.git/foo work. Fixes #9193. Change-Id: I8c9d4096903288f7f0e82d6ed1aa78bf038fb81a Reviewed-on: https://go-review.googlesource.com/17952 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
06b46c0d9c
commit
0d641c754f
|
|
@ -885,7 +885,7 @@ var vcsPaths = []*vcsPath{
|
|||
// 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_.\-]+)*$`,
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue