MCPcopy Index your code
hub / github.com/cursor/cookbook / runGit

Function runGit

sdk/coding-agent-cli/src/agent.ts:411–420  ·  view source on GitHub ↗
(cwd: string, args: string[])

Source from the content-addressed store, hash-verified

409}
410
411function runGit(cwd: string, args: string[]) {
412 try {
413 return execFileSync("git", ["-C", cwd, ...args], {
414 encoding: "utf8",
415 stdio: ["ignore", "pipe", "ignore"],
416 }).trim()
417 } catch {
418 return undefined
419 }
420}
421
422function normalizeGitHubRemote(remote: string) {
423 const trimmed = remote.trim().replace(/\.git$/, "")

Callers 1

detectCloudRepositoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected