MCPcopy Create free account
hub / github.com/LegacyCodeHQ/clarity-cli / gitWorktreeAdd

Function gitWorktreeAdd

vcs/git/git_worktree_test.go:174–180  ·  view source on GitHub ↗

gitWorktreeAdd runs `git worktree add -b ` against repoDir.

(t *testing.T, repoDir, wtPath, branch string)

Source from the content-addressed store, hash-verified

172
173// gitWorktreeAdd runs `git worktree add -b <branch> <path>` against repoDir.
174func gitWorktreeAdd(t *testing.T, repoDir, wtPath, branch string) {
175 t.Helper()
176 cmd := exec.Command("git", "worktree", "add", "-b", branch, wtPath)
177 cmd.Dir = repoDir
178 out, err := cmd.CombinedOutput()
179 require.NoError(t, err, "git worktree add failed: %s", string(out))
180}

Calls

no outgoing calls

Tested by

no test coverage detected