* Normalize git paths relative to originalCwd
( files: string[], repoRoot: string, originalCwd: string, )
| 150 | * Normalize git paths relative to originalCwd |
| 151 | */ |
| 152 | function 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 |