MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / getWorkspaceGitInfo

Function getWorkspaceGitInfo

src/utils/git.ts:183–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181 * @returns Git repository information or empty object if not available
182 */
183export 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
194async function checkGitRepo(cwd: string): Promise<boolean> {
195 try {

Callers 2

git.spec.tsFile · 0.90
getGitPropertiesMethod · 0.90

Calls 1

getGitRepositoryInfoFunction · 0.85

Tested by

no test coverage detected