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

Function remoteNameSortScore

git/objects.go:17–28  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

15}
16
17func remoteNameSortScore(name string) int {
18 switch strings.ToLower(name) {
19 case "upstream":
20 return 3
21 case "github":
22 return 2
23 case "origin":
24 return 1
25 default:
26 return 0
27 }
28}
29
30// Remote is a parsed git remote.
31type Remote struct {

Callers 1

LessMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected