MCPcopy
hub / github.com/codeaashu/claude-code / createFindCanonicalGitRoot

Function createFindCanonicalGitRoot

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

Source from the content-addressed store, hash-verified

195export const findCanonicalGitRoot = createFindCanonicalGitRoot()
196
197function createFindCanonicalGitRoot(): {
198 (startPath: string): string | null
199 cache: typeof resolveCanonicalRoot.cache
200} {
201 function wrapper(startPath: string): string | null {
202 const root = findGitRoot(startPath)
203 if (!root) {
204 return null
205 }
206 return resolveCanonicalRoot(root)
207 }
208 wrapper.cache = resolveCanonicalRoot.cache
209 return wrapper
210}
211
212export const gitExe = memoize((): string => {
213 // 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