Be explicit about github.com prefix being a legacy feature

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: babb0c14fd1281b309de46c3481a5bea88b8031d
Component: engine
This commit is contained in:
Sebastiaan van Stijn
2018-05-30 11:09:14 +02:00
parent f21c0ccd84
commit 90dfa0b4ee
+9 -1
View File
@@ -9,7 +9,15 @@ import (
var (
validPrefixes = map[string][]string{
"url": {"http://", "https://"},
"url": {"http://", "https://"},
// The github.com/ prefix is a special case used to treat context-paths
// starting with `github.com` as a git URL if the given path does not
// exist locally. The "github.com/" prefix is kept for backward compatibility,
// and is a legacy feature.
//
// Going forward, no additional prefixes should be added, and users should
// be encouraged to use explicit URLs (https://github.com/user/repo.git) instead.
"git": {"git://", "github.com/", "git@"},
"transport": {"tcp://", "tcp+tls://", "udp://", "unix://", "unixgram://"},
}