Allow git@ prefixes for any hosted git service

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: c7e4cc4a531b5337d64bda22df8553e646a96fe7
Component: engine
This commit is contained in:
Aidan Hobson Sayers
2014-11-14 01:52:55 +00:00
parent 1705df26bc
commit 85fb88371f
3 changed files with 27 additions and 8 deletions

View File

@ -293,7 +293,7 @@ func IsURL(str string) bool {
}
func IsGIT(str string) bool {
return strings.HasPrefix(str, "git://") || strings.HasPrefix(str, "github.com/") || strings.HasPrefix(str, "git@github.com:") || (strings.HasSuffix(str, ".git") && IsURL(str))
return strings.HasPrefix(str, "git://") || strings.HasPrefix(str, "github.com/") || strings.HasPrefix(str, "git@") || (strings.HasSuffix(str, ".git") && IsURL(str))
}
func ValidGitTransport(str string) bool {