MCPcopy Create free account
hub / github.com/cloudflare/computer / parsePushRefspec

Function parsePushRefspec

packages/computer/src/git/cli.ts:1496–1503  ·  view source on GitHub ↗
(ref: string | undefined)

Source from the content-addressed store, hash-verified

1494}
1495
1496function parsePushRefspec(ref: string | undefined): { ref?: string; remoteRef?: string } {
1497 if (ref === undefined) return {};
1498 const colon = ref.indexOf(":");
1499 if (colon <= 0 || colon !== ref.lastIndexOf(":") || colon === ref.length - 1) {
1500 return { ref };
1501 }
1502 return { ref: ref.slice(0, colon), remoteRef: ref.slice(colon + 1) };
1503}
1504
1505// ---------------------------------------------------------------
1506// pull

Callers 1

runPushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected