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

Function seedInitialCommit

vcs/git/git_worktree_test.go:166–171  ·  view source on GitHub ↗

seedInitialCommit ensures the repo has at least one commit so worktree-add can succeed.

(t *testing.T, repoDir string)

Source from the content-addressed store, hash-verified

164
165// seedInitialCommit ensures the repo has at least one commit so worktree-add can succeed.
166func seedInitialCommit(t *testing.T, repoDir string) {
167 t.Helper()
168 createFile(t, repoDir, "README.md", "# seed\n")
169 gitAdd(t, repoDir, "README.md")
170 gitCommit(t, repoDir, "seed: initial commit")
171}
172
173// gitWorktreeAdd runs `git worktree add -b <branch> <path>` against repoDir.
174func gitWorktreeAdd(t *testing.T, repoDir, wtPath, branch string) {

Calls 3

createFileFunction · 0.85
gitAddFunction · 0.85
gitCommitFunction · 0.85

Tested by

no test coverage detected