Merge 0135ece96f
into ee8b788538
This commit is contained in:
commit
478e955bb9
2 changed files with 5 additions and 1 deletions
|
@ -34,6 +34,7 @@ func IsURL(str string) bool {
|
|||
// - http://(.*).git(?:#.+)?$ same, but non-TLS
|
||||
// - git://(.*) URLs using git:// scheme
|
||||
// - git@(.*)
|
||||
// - ssh://git@(.*)
|
||||
// - github.com/ see description below
|
||||
//
|
||||
// The github.com/ prefix is a special case used to treat context-paths
|
||||
|
@ -77,7 +78,7 @@ func IsGitURL(str string) bool {
|
|||
if IsURL(str) && urlPathWithFragmentSuffix.MatchString(str) {
|
||||
return true
|
||||
}
|
||||
for _, prefix := range []string{"git://", "github.com/", "git@"} {
|
||||
for _, prefix := range []string{"git://", "github.com/", "git@", "ssh://"} {
|
||||
if strings.HasPrefix(str, prefix) {
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -11,6 +11,9 @@ var (
|
|||
"http://github.com/docker/docker.git",
|
||||
"http://github.com/docker/docker.git#branch",
|
||||
"http://github.com/docker/docker.git#:dir",
|
||||
"ssh://git@github.com/docker/docker.git",
|
||||
"ssh://a_user@github.com/docker/docker.git",
|
||||
"ssh://github.com/docker/docker.git",
|
||||
}
|
||||
incompleteGitUrls = []string{
|
||||
"github.com/docker/docker",
|
||||
|
|
Loading…
Add table
Reference in a new issue