MCPcopy Create free account
hub / github.com/coder/mux / gitStatusCommand

Function gitStatusCommand

src/cli/debug/git-status.ts:118–160  ·  view source on GitHub ↗
(workspaceId?: string)

Source from the content-addressed store, hash-verified

116}
117
118export function gitStatusCommand(workspaceId?: string) {
119 const muxSrcDir = getMuxSrcDir();
120 console.log("🔍 Git Status Debug Tool");
121 console.log("Finding workspaces in:", muxSrcDir);
122 console.log();
123
124 const workspaces = findWorkspaces();
125 console.log(`Found ${workspaces.length} workspaces\n`);
126
127 if (workspaces.length === 0) {
128 console.log("No workspaces found! Check that ~/.mux/src/ contains workspace directories.");
129 process.exit(1);
130 }
131
132 if (workspaceId) {
133 // Test specific workspace
134 const workspace = workspaces.find((w) => w.id === workspaceId);
135 if (!workspace) {
136 console.error(`Workspace "${workspaceId}" not found`);
137 console.log("\nAvailable workspaces:");
138 workspaces.forEach((w) => console.log(` - ${w.id}`));
139 process.exit(1);
140 }
141 testGitStatus(workspace.id, workspace.path);
142 } else {
143 // Test first 3 workspaces
144 const toTest = workspaces.slice(0, 3);
145 console.log(
146 `Testing ${toTest.length} workspaces (use "bun debug git-status <id>" for specific workspace)...\n`
147 );
148
149 for (const workspace of toTest) {
150 testGitStatus(workspace.id, workspace.path);
151 }
152
153 console.log("\n" + "=".repeat(80));
154 console.log("Available workspaces:");
155 workspaces.forEach((w) => console.log(` - ${w.id}`));
156 }
157
158 console.log("\n" + "=".repeat(80));
159 console.log("Done!");
160}

Callers

nothing calls this directly

Calls 3

getMuxSrcDirFunction · 0.90
findWorkspacesFunction · 0.85
testGitStatusFunction · 0.85

Tested by

no test coverage detected