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

Function initGitRepo

src/node/services/taskService.test.ts:66–75  ·  view source on GitHub ↗
(projectPath: string)

Source from the content-addressed store, hash-verified

64import assert from "node:assert";
65
66function initGitRepo(projectPath: string): void {
67 execSync("git init -b main", { cwd: projectPath, stdio: "ignore" });
68 execSync('git config user.email "test@example.com"', { cwd: projectPath, stdio: "ignore" });
69 execSync('git config user.name "test"', { cwd: projectPath, stdio: "ignore" });
70 // Ensure tests don't hang when developers have global commit signing enabled.
71 execSync("git config commit.gpgsign false", { cwd: projectPath, stdio: "ignore" });
72 execSync("bash -lc 'echo \"hello\" > README.md'", { cwd: projectPath, stdio: "ignore" });
73 execSync("git add README.md", { cwd: projectPath, stdio: "ignore" });
74 execSync('git commit -m "init"', { cwd: projectPath, stdio: "ignore" });
75}
76
77async function collectFullHistory(service: HistoryService, workspaceId: string) {
78 const messages: MuxMessage[] = [];

Callers 2

createTestProjectFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected