vendor: update git url handling with changes to buildkit

The git ssh url parsing API changed a bit and broke how buildx utilized
the API. This updates the affected method with the new method of
identifying an SSH url.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2023-08-25 13:42:18 -05:00
parent da6662975f
commit fc7f066caa
28 changed files with 525 additions and 435 deletions

View File

@@ -28,6 +28,6 @@ func ParseSSHSpecs(sl []string) ([]*controllerapi.SSH, error) {
// IsGitSSH returns true if the given repo URL is accessed over ssh
func IsGitSSH(url string) bool {
_, gitProtocol := gitutil.ParseProtocol(url)
return gitProtocol == gitutil.SSHProtocol
remote, err := gitutil.ParseURL(url)
return err == nil && remote.Scheme == gitutil.SSHProtocol
}