MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / hasGitUpstream

Function hasGitUpstream

services/cloud-agent-next/wrapper/src/utils.ts:351–366  ·  view source on GitHub ↗
(
  workspacePath: string,
  timeoutMs?: number,
  signal?: AbortSignal
)

Source from the content-addressed store, hash-verified

349 stderr,
350 exitCode,
351 elapsedMs: Date.now() - startedAt,
352 ...rawOutput(),
353 ...(stdoutTruncated ? { stdoutTruncated: true } : {}),
354 ...(stderrTruncated ? { stderrTruncated: true } : {}),
355 });
356 };
357 if (!owned || process.platform !== 'linux') {
358 complete();
359 return;
360 }
361 const remainingMs =
362 opts?.timeoutMs !== undefined
363 ? Math.max(0, opts.timeoutMs - (Date.now() - startedAt))
364 : OWNED_TREE_OBSERVATION_MS;
365 void waitForOwnedTree(owned, Date.now() + remainingMs).then(complete, complete);
366 });
367 proc.on('error', err => {
368 if (settled || finishing) return;
369 settled = true;

Callers 1

runAutoCommitFunction · 0.85

Calls 1

gitFunction · 0.85

Tested by

no test coverage detected