MCPcopy Create free account
hub / github.com/agent-tower/core / initRepo

Function initRepo

packages/server/src/git/worktree.manager.test.ts:12–21  ·  view source on GitHub ↗
(repoPath: string)

Source from the content-addressed store, hash-verified

10}
11
12function initRepo(repoPath: string) {
13 fs.mkdirSync(repoPath, { recursive: true });
14 git(repoPath, ['init']);
15 git(repoPath, ['checkout', '-B', 'main']);
16 git(repoPath, ['config', 'user.email', 'test@example.com']);
17 git(repoPath, ['config', 'user.name', 'Test User']);
18 fs.writeFileSync(path.join(repoPath, 'README.md'), '# test\n');
19 git(repoPath, ['add', 'README.md']);
20 git(repoPath, ['commit', '-m', 'initial commit']);
21}
22
23describe('WorktreeManager.remove', () => {
24 let tempDir: string;

Callers 1

Calls 2

gitFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected