MCPcopy
hub / github.com/git-lfs/git-lfs / MapRemoteURL

Function MapRemoteURL

git/git.go:491–503  ·  view source on GitHub ↗
(url string, push bool)

Source from the content-addressed store, hash-verified

489}
490
491func MapRemoteURL(url string, push bool) (string, bool) {
492 urls, err := RemoteURLs(push)
493 if err != nil {
494 return url, false
495 }
496
497 for name, remotes := range urls {
498 if len(remotes) == 1 && url == remotes[0] {
499 return name, true
500 }
501 }
502 return url, false
503}
504
505// Refs returns all of the local and remote branches and tags for the current
506// repository. Other refs (HEAD, refs/stash, git notes) are ignored.

Callers 2

prePushCommandFunction · 0.92
TestMapRemoteURLFunction · 0.85

Calls 1

RemoteURLsFunction · 0.85

Tested by 1

TestMapRemoteURLFunction · 0.68