mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
vendor: github.com/moby/buildkit 6bd81372ad6f (v0.13.0-dev)
full diff: 6bd81372ad...d6e142600e
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
9
vendor/github.com/moby/buildkit/util/gitutil/git_url.go
generated
vendored
9
vendor/github.com/moby/buildkit/util/gitutil/git_url.go
generated
vendored
@ -96,6 +96,15 @@ func ParseURL(remote string) (*GitURL, error) {
|
||||
return nil, ErrUnknownProtocol
|
||||
}
|
||||
|
||||
func IsGitTransport(remote string) bool {
|
||||
if proto := protoRegexp.FindString(remote); proto != "" {
|
||||
proto = strings.ToLower(strings.TrimSuffix(proto, "://"))
|
||||
_, ok := supportedProtos[proto]
|
||||
return ok
|
||||
}
|
||||
return sshutil.IsImplicitSSHTransport(remote)
|
||||
}
|
||||
|
||||
func fromURL(url *url.URL) *GitURL {
|
||||
withoutFragment := *url
|
||||
withoutFragment.Fragment = ""
|
||||
|
Reference in New Issue
Block a user