MCPcopy Index your code
hub / github.com/coder/mux / initGitRepo

Function initGitRepo

src/node/worktree/WorktreeManager.test.ts:11–20  ·  view source on GitHub ↗
(projectPath: string)

Source from the content-addressed store, hash-verified

9import { WorktreeManager } from "./WorktreeManager";
10
11function initGitRepo(projectPath: string): void {
12 execSync("git init -b main", { cwd: projectPath, stdio: "ignore" });
13 execSync('git config user.email "test@example.com"', { cwd: projectPath, stdio: "ignore" });
14 execSync('git config user.name "test"', { cwd: projectPath, stdio: "ignore" });
15 // Ensure tests don't hang when developers have global commit signing enabled.
16 execSync("git config commit.gpgsign false", { cwd: projectPath, stdio: "ignore" });
17 execSync("bash -lc 'echo \"hello\" > README.md'", { cwd: projectPath, stdio: "ignore" });
18 execSync("git add README.md", { cwd: projectPath, stdio: "ignore" });
19 execSync('git commit -m "init"', { cwd: projectPath, stdio: "ignore" });
20}
21
22function createNullInitLogger(): InitLogger {
23 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected