perf: avoid duplicated git log calls in loadContent() and postBuild() for untracked Git files (#11211)

Co-authored-by: slorber <749374+slorber@users.noreply.github.com>
This commit is contained in:
Sébastien Lorber 2025-05-28 14:03:10 +02:00 committed by GitHub
parent 68aa3c876b
commit 264774a550
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 160 additions and 21 deletions

View file

@ -154,12 +154,12 @@ export async function getFileCommitDate(
file,
)}"`;
const result = (await GitCommandQueue.add(() =>
execa(command, {
const result = (await GitCommandQueue.add(() => {
return execa(command, {
cwd: path.dirname(file),
shell: true,
}),
))!;
});
}))!;
if (result.exitCode !== 0) {
throw new Error(