MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / _run_git

Function _run_git

src/harness/checkpoints/workspace_manifest.py:58–72  ·  view source on GitHub ↗

Run a git command, return stdout or None on failure.

(cwd: Path, *args: str, timeout: int = 60)

Source from the content-addressed store, hash-verified

56
57
58def _run_git(cwd: Path, *args: str, timeout: int = 60) -> Optional[str]:
59 """Run a git command, return stdout or None on failure."""
60 try:
61 result = subprocess.run(
62 ["git", *args],
63 cwd=str(cwd),
64 capture_output=True,
65 text=True,
66 timeout=timeout,
67 )
68 if result.returncode == 0:
69 return result.stdout.strip()
70 return None
71 except Exception:
72 return None
73
74
75def _backup_large_file(

Callers 2

Calls 1

runMethod · 0.45

Tested by

no test coverage detected