зеркало из https://github.com/golang/dep.git
I mean I GUESS we can have gh repos from kr
This commit is contained in:
Родитель
d29f373dc8
Коммит
85459396b7
|
@ -33,7 +33,7 @@ var (
|
|||
// This regex allowed some usernames that github currently disallows. They
|
||||
// may have allowed them in the past; keeping it in case we need to revert.
|
||||
//ghRegex = regexp.MustCompile(`^(?P<root>github\.com/([A-Za-z0-9_.\-]+/[A-Za-z0-9_.\-]+))(/[A-Za-z0-9_.\-]+)*$`)
|
||||
ghRegex = regexp.MustCompile(`^(?P<root>github\.com/([A-Za-z0-9][-A-Za-z0-9]+[A-Za-z0-9]/[A-Za-z0-9_.\-]+))((?:/[A-Za-z0-9_.\-]+)*)$`)
|
||||
ghRegex = regexp.MustCompile(`^(?P<root>github\.com/([A-Za-z0-9][-A-Za-z0-9]*[A-Za-z0-9]/[A-Za-z0-9_.\-]+))((?:/[A-Za-z0-9_.\-]+)*)$`)
|
||||
gpinNewRegex = regexp.MustCompile(`^(?P<root>gopkg\.in/(?:([a-zA-Z0-9][-a-zA-Z0-9]+)/)?([a-zA-Z][-.a-zA-Z0-9]*)\.((?:v0|v[1-9][0-9]*)(?:\.0|\.[1-9][0-9]*){0,2}(-unstable)?)(?:\.git)?)((?:/[a-zA-Z0-9][-.a-zA-Z0-9]*)*)$`)
|
||||
//gpinOldRegex = regexp.MustCompile(`^(?P<root>gopkg\.in/(?:([a-z0-9][-a-z0-9]+)/)?((?:v0|v[1-9][0-9]*)(?:\.0|\.[1-9][0-9]*){0,2}(-unstable)?)/([a-zA-Z][-a-zA-Z0-9]*)(?:\.git)?)((?:/[a-zA-Z][-a-zA-Z0-9]*)*)$`)
|
||||
bbRegex = regexp.MustCompile(`^(?P<root>bitbucket\.org/(?P<bitname>[A-Za-z0-9_.\-]+/[A-Za-z0-9_.\-]+))((?:/[A-Za-z0-9_.\-]+)*)$`)
|
||||
|
|
|
@ -365,6 +365,20 @@ func TestDeduceRemotes(t *testing.T) {
|
|||
VCS: []string{"git"},
|
||||
},
|
||||
},
|
||||
// Regression - gh does allow 2-letter usernames
|
||||
{
|
||||
"github.com/kr/pretty",
|
||||
&remoteRepo{
|
||||
Base: "github.com/kr/pretty",
|
||||
RelPkg: "",
|
||||
CloneURL: &url.URL{
|
||||
Host: "github.com",
|
||||
Path: "kr/pretty",
|
||||
},
|
||||
Schemes: nil,
|
||||
VCS: []string{"git"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, fix := range fixtures {
|
||||
|
|
Загрузка…
Ссылка в новой задаче