MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / isGitRepo

Function isGitRepo

projects/electron/src/modules/code/files.ts:145–148  ·  view source on GitHub ↗

* Check if directory is within a git repository

(dir: string)

Source from the content-addressed store, hash-verified

143 * Check if directory is within a git repository
144 */
145async function isGitRepo(dir: string): Promise<boolean> {
146 const result = await execCmd("git", ["rev-parse", "--is-inside-work-tree"], dir)
147 return result.success && result.stdout.trim() === "true"
148}
149
150/**
151 * Get git repo root from a directory

Callers 1

getFileListFunction · 0.85

Calls 1

execCmdFunction · 0.85

Tested by

no test coverage detected