()
| 181 | * @returns Git repository information or empty object if not available |
| 182 | */ |
| 183 | export async function getWorkspaceGitInfo(): Promise<GitRepositoryInfo> { |
| 184 | const workspaceFolders = vscode.workspace.workspaceFolders |
| 185 | if (!workspaceFolders || workspaceFolders.length === 0) { |
| 186 | return {} |
| 187 | } |
| 188 | |
| 189 | // Use the first workspace folder. |
| 190 | const workspaceRoot = workspaceFolders[0].uri.fsPath |
| 191 | return getGitRepositoryInfo(workspaceRoot) |
| 192 | } |
| 193 | |
| 194 | async function checkGitRepo(cwd: string): Promise<boolean> { |
| 195 | try { |
no test coverage detected