MCPcopy Create free account
hub / github.com/pingdotgg/t3code / parseRemoteNamesInGitOrder

Function parseRemoteNamesInGitOrder

apps/server/src/git/remoteRefs.ts:1–10  ·  view source on GitHub ↗
(stdout: string)

Source from the content-addressed store, hash-verified

1export 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
12export function parseRemoteNames(stdout: string): ReadonlyArray<string> {
13 return parseRemoteNamesInGitOrder(stdout).toSorted((a, b) => b.length - a.length);

Callers 1

parseRemoteNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected