pull/4965/head
Divyansh Singh 2 months ago
parent e64368fc45
commit fc1bdca93c

@ -127,10 +127,12 @@ export async function cacheAllGitTimestamps(
child.stdout child.stdout
.pipe(new GitLogParser()) .pipe(new GitLogParser())
.on('data', (rec: GitLogRecord) => { .on('data', (rec: GitLogRecord) => {
for (let i = 0; i < rec.files.length; i++) { for (const file of rec.files) {
const file = rec.files[i]
const abs = path.resolve(gitRoot, file) const abs = path.resolve(gitRoot, file)
if (fs.existsSync(abs)) cache.set(slash(abs), rec.ts) const slashed = slash(abs)
if (!cache.has(slashed) && fs.existsSync(abs)) {
cache.set(slashed, rec.ts)
}
} }
}) })
.on('error', reject) .on('error', reject)

Loading…
Cancel
Save