vendor: github.com/moby/buildkit@master 9b6f60ac8bf9

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-10-11 23:03:13 +02:00
committed by CrazyMax
parent beaebcbf39
commit 228a816bbb
118 changed files with 19106 additions and 18311 deletions
@@ -212,3 +212,17 @@ func (gf *GitRef) loadQuery(query url.Values) error {
}
return nil
}
// FragmentFormat returns a simplified git URL in fragment format with only ref.
// If the URL cannot be parsed, the original string is returned with false.
func FragmentFormat(remote string) (string, bool) {
gitRef, _, err := ParseGitRef(remote)
if err != nil || gitRef == nil {
return remote, false
}
u := gitRef.Remote
if gitRef.Ref != "" {
u += "#" + gitRef.Ref
}
return u, true
}
+1 -1
View File
@@ -30,7 +30,7 @@ var supportedProtos = map[string]struct{}{
var protoRegexp = regexp.MustCompile(`^[a-zA-Z0-9]+://`)
// URL is a custom URL type that points to a remote Git repository.
// GitURL is a custom URL type that points to a remote Git repository.
//
// URLs can be parsed from both standard URLs (e.g.
// "https://github.com/moby/buildkit.git"), as well as SCP-like URLs (e.g.