mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 02:08:55 +02:00
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:
parent
68aa3c876b
commit
264774a550
10 changed files with 160 additions and 21 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue