MCPcopy Index your code
hub / github.com/codeaashu/claude-code / normalizeGitPaths

Function normalizeGitPaths

src/hooks/fileSuggestions.ts:152–164  ·  view source on GitHub ↗

* Normalize git paths relative to originalCwd

(
  files: string[],
  repoRoot: string,
  originalCwd: string,
)

Source from the content-addressed store, hash-verified

150 * Normalize git paths relative to originalCwd
151 */
152function normalizeGitPaths(
153 files: string[],
154 repoRoot: string,
155 originalCwd: string,
156): string[] {
157 if (originalCwd === repoRoot) {
158 return files
159 }
160 return files.map(f => {
161 const absolutePath = path.join(repoRoot, f)
162 return path.relative(originalCwd, absolutePath)
163 })
164}
165
166/**
167 * Merge already-normalized untracked files into the cache

Callers 1

getFilesUsingGitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected