(stdout: string)
| 1 | export function parseRemoteNamesInGitOrder(stdout: string): ReadonlyArray<string> { |
| 2 | const remoteNames: Array<string> = []; |
| 3 | for (const line of stdout.split("\n")) { |
| 4 | const remoteName = line.trim(); |
| 5 | if (remoteName.length > 0) { |
| 6 | remoteNames.push(remoteName); |
| 7 | } |
| 8 | } |
| 9 | return remoteNames; |
| 10 | } |
| 11 | |
| 12 | export function parseRemoteNames(stdout: string): ReadonlyArray<string> { |
| 13 | return parseRemoteNamesInGitOrder(stdout).toSorted((a, b) => b.length - a.length); |