MCPcopy
hub / github.com/cli/cli / parseRemoteURLOrName

Function parseRemoteURLOrName

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

Source from the content-addressed store, hash-verified

976}
977
978func parseRemoteURLOrName(value string) (*url.URL, string) {
979 if strings.Contains(value, ":") {
980 if u, err := ParseURL(value); err == nil {
981 return u, ""
982 }
983 } else if !isFilesystemPath(value) {
984 return nil, value
985 }
986 return nil, ""
987}
988
989func populateResolvedRemotes(remotes RemoteSet, resolved []string) {
990 for _, l := range resolved {

Callers 2

parseBranchConfigFunction · 0.85

Calls 3

isFilesystemPathFunction · 0.85
ContainsMethod · 0.80
ParseURLFunction · 0.70

Tested by 1