MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / isRepoClean

Function isRepoClean

scripts/sparc2/src/git/gitIntegration.ts:396–413  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

394 * @returns True if the repository is clean
395 */
396export async function isRepoClean(): Promise<boolean> {
397 const cmd = new Deno.Command("git", {
398 args: ["status", "--porcelain"],
399 stdout: "piped",
400 stderr: "piped",
401 });
402
403 const output = await cmd.output();
404 if (!output.success) {
405 const errorOutput = new TextDecoder().decode(output.stderr);
406 await logMessage("error", `Checking repo status failed: ${errorOutput}`);
407 throw new Error(`Checking repo status failed: ${errorOutput}`);
408 }
409
410 const statusText = new TextDecoder().decode(output.stdout);
411
412 return statusText.trim() === "";
413}

Callers 2

isRepoCleanMethod · 0.90

Calls 1

logMessageFunction · 0.90

Tested by

no test coverage detected