1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Be explicit about github.com prefix being a legacy feature

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-05-30 11:06:06 +02:00
parent 65bd038fc5
commit babb0c14fd
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -10,6 +10,14 @@ import (
var ( var (
validPrefixes = map[string][]string{ 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@"}, "git": {"git://", "github.com/", "git@"},
"transport": {"tcp://", "tcp+tls://", "udp://", "unix://", "unixgram://"}, "transport": {"tcp://", "tcp+tls://", "udp://", "unix://", "unixgram://"},
} }