(name string)
| 15 | } |
| 16 | |
| 17 | func 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. |
| 31 | type Remote struct { |