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

Function parseRemoteURLOrName

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

Source from the content-addressed store, hash-verified

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

Callers 2

parseBranchConfigFunction · 0.85

Calls 3

isFilesystemPathFunction · 0.85
ContainsMethod · 0.80
ParseURLFunction · 0.70

Tested by 1