MCPcopy
hub / github.com/go-git/go-git / IsLocalEndpoint

Function IsLocalEndpoint

internal/url/url.go:70–72  ·  view source on GitHub ↗

IsLocalEndpoint returns true if the given URL string specifies a local file endpoint. For example, on a Linux machine, `/home/user/src/go-git` would match as a local endpoint, but `https://github.com/src-d/go-git` would not.

(url string)

Source from the content-addressed store, hash-verified

68// `/home/user/src/go-git` would match as a local endpoint, but
69// `https://github.com/src-d/go-git` would not.
70func IsLocalEndpoint(url string) bool {
71 return !MatchesScheme(url) && !MatchesScpLike(url)
72}

Callers 3

cloneMethod · 0.92
PushContextMethod · 0.92
IsFirstURLLocalMethod · 0.92

Calls 2

MatchesSchemeFunction · 0.85
MatchesScpLikeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…