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

Function parseRemoteURLOrName

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

Source from the content-addressed store, hash-verified

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

Callers 2

TestParseRemoteURLOrNameFunction · 0.85
parseBranchConfigFunction · 0.85

Calls 3

isFilesystemPathFunction · 0.85
ContainsMethod · 0.80
ParseURLFunction · 0.70

Tested by 1

TestParseRemoteURLOrNameFunction · 0.68