mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to v0.14.0-rc2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
6
vendor/github.com/moby/buildkit/util/gitutil/git_ref.go
generated
vendored
6
vendor/github.com/moby/buildkit/util/gitutil/git_ref.go
generated
vendored
@ -4,7 +4,7 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
cerrdefs "github.com/containerd/errdefs"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@ -58,7 +58,7 @@ func ParseGitRef(ref string) (*GitRef, error) {
|
||||
)
|
||||
|
||||
if strings.HasPrefix(ref, "./") || strings.HasPrefix(ref, "../") {
|
||||
return nil, errdefs.ErrInvalidArgument
|
||||
return nil, cerrdefs.ErrInvalidArgument
|
||||
} else if strings.HasPrefix(ref, "github.com/") {
|
||||
res.IndistinguishableFromLocal = true // Deprecated
|
||||
remote = fromURL(&url.URL{
|
||||
@ -84,7 +84,7 @@ func ParseGitRef(ref string) (*GitRef, error) {
|
||||
// An HTTP(S) URL is considered to be a valid git ref only when it has the ".git[...]" suffix.
|
||||
case HTTPProtocol, HTTPSProtocol:
|
||||
if !strings.HasSuffix(remote.Path, ".git") {
|
||||
return nil, errdefs.ErrInvalidArgument
|
||||
return nil, cerrdefs.ErrInvalidArgument
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user