MCPcopy Create free account
hub / github.com/cli/cli / parseRemoteURLOrName

Function parseRemoteURLOrName

git/client.go:1040–1049  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

1038}
1039
1040func parseRemoteURLOrName(value string) (*url.URL, string) {
1041 if strings.Contains(value, ":") {
1042 if u, err := ParseURL(value); err == nil {
1043 return u, ""
1044 }
1045 } else if !isFilesystemPath(value) {
1046 return nil, value
1047 }
1048 return nil, ""
1049}
1050
1051func populateResolvedRemotes(remotes RemoteSet, resolved []string) {
1052 for _, l := range resolved {

Callers 2

parseBranchConfigFunction · 0.85

Calls 3

isFilesystemPathFunction · 0.85
ContainsMethod · 0.80
ParseURLFunction · 0.70

Tested by 1