MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / createFindCanonicalGitRoot

Function createFindCanonicalGitRoot

source code/utils/git.ts:199–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197export const findCanonicalGitRoot = createFindCanonicalGitRoot()
198
199function createFindCanonicalGitRoot(): {
200 (startPath: string): string | null
201 cache: typeof resolveCanonicalRoot.cache
202} {
203 function wrapper(startPath: string): string | null {
204 const root = findGitRoot(startPath)
205 if (!root) {
206 return null
207 }
208 return resolveCanonicalRoot(root)
209 }
210 wrapper.cache = resolveCanonicalRoot.cache
211 return wrapper
212}
213
214export const gitExe = memoize((): string => {
215 // Every time we spawn a process, we have to lookup the path.

Callers 1

git.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected