seedInitialCommit ensures the repo has at least one commit so worktree-add can succeed.
(t *testing.T, repoDir string)
| 164 | |
| 165 | // seedInitialCommit ensures the repo has at least one commit so worktree-add can succeed. |
| 166 | func 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. |
| 174 | func gitWorktreeAdd(t *testing.T, repoDir, wtPath, branch string) { |
no test coverage detected