MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / hasGitDirectory

Function hasGitDirectory

cli/src/utils/directory-browser.ts:65–72  ·  view source on GitHub ↗
(dirPath: string)

Source from the content-addressed store, hash-verified

63 * Check if a directory contains a .git subdirectory.
64 */
65export function hasGitDirectory(dirPath: string): boolean {
66 try {
67 const gitPath = path.join(dirPath, '.git')
68 return statSync(gitPath).isDirectory()
69 } catch {
70 return false
71 }
72}

Callers 2

useDirectoryBrowserFunction · 0.90
getDirectoriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected