MCPcopy Index your code
hub / github.com/cli/cli / populateResolvedRemotes

Function populateResolvedRemotes

git/client.go:989–1007  ·  view source on GitHub ↗
(remotes RemoteSet, resolved []string)

Source from the content-addressed store, hash-verified

987}
988
989func populateResolvedRemotes(remotes RemoteSet, resolved []string) {
990 for _, l := range resolved {
991 parts := strings.SplitN(l, " ", 2)
992 if len(parts) < 2 {
993 continue
994 }
995 rp := strings.SplitN(parts[0], ".", 3)
996 if len(rp) < 2 {
997 continue
998 }
999 name := rp[1]
1000 for _, r := range remotes {
1001 if r.Name == name {
1002 r.Resolved = parts[1]
1003 break
1004 }
1005 }
1006 }
1007}
1008
1009var globReplacer = strings.NewReplacer(
1010 "*", `\*`,

Callers 1

RemotesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected