(repoPath: string)
| 144 | async function initializeEmptyRepository(repoPath: string): Promise<void> { |
| 145 | await execGit(repoPath, ['init']); |
| 146 | await execGit(repoPath, ['symbolic-ref', 'HEAD', 'refs/heads/main']); |
| 147 | } |
| 148 | |
| 149 | async function removeGitMetadata(repoPath: string): Promise<void> { |
| 150 | await fsPromises.rm(path.join(repoPath, '.git'), { recursive: true, force: true }).catch(() => {}); |
| 151 | } |
| 152 | |
| 153 | async function resolveProjectPath(repoPath: string): Promise<{ |
| 154 | resolvedPath: string; |
| 155 | repoRemoteUrl: string | null; |
| 156 | }> { |
| 157 | const resolvedPath = path.resolve(repoPath); |
| 158 | assertDirectoryPathExists(resolvedPath); |
| 159 | |
| 160 | return { |
no test coverage detected