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

Method runWorktreeAdd

src/node/runtime/SSHRuntime.ts:2866–2878  ·  view source on GitHub ↗
(baseRef: string)

Source from the content-addressed store, hash-verified

2864 // resetting a branch that's active in another worktree.
2865 initLogger.logStep(`Creating worktree for branch: ${branchName}`);
2866 const runWorktreeAdd = (baseRef: string) =>
2867 execBuffered(
2868 this,
2869 [
2870 buildBestEffortDetachBaseRepoHeadCommand(baseRepoPathArg, shescape.quote(baseRef)),
2871 `${nhp}git -C ${baseRepoPathArg} worktree add ${workspacePathArg} -B ${shescape.quote(branchName)} ${shescape.quote(baseRef)}`,
2872 ].join("\n"),
2873 {
2874 cwd: "/tmp",
2875 timeout: 300,
2876 abortSignal,
2877 }
2878 );
2879
2880 let worktreeBase = newBranchBase;
2881 let worktreeResult = await runWorktreeAdd(worktreeBase);

Callers

nothing calls this directly

Calls 2

execBufferedFunction · 0.90

Tested by

no test coverage detected