MCPcopy
hub / github.com/opactorai/Claudable / ensureGitRepository

Function ensureGitRepository

lib/services/git.ts:175–183  ·  view source on GitHub ↗
(repoPath: string)

Source from the content-addressed store, hash-verified

173}
174
175export function ensureGitRepository(repoPath: string) {
176 if (!fs.existsSync(repoPath)) {
177 fs.mkdirSync(repoPath, { recursive: true });
178 }
179 if (!fs.existsSync(path.join(repoPath, '.git'))) {
180 runGit(['init'], repoPath);
181 }
182 ensureGitignore(repoPath);
183}

Callers 2

connectProjectToGitHubFunction · 0.90
pushProjectToGitHubFunction · 0.90

Calls 2

runGitFunction · 0.85
ensureGitignoreFunction · 0.85

Tested by

no test coverage detected