mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Git - Extract querying for status so that it can run in parallel with the other operations (#163990)
This commit is contained in:
@@ -1954,7 +1954,7 @@ export class Repository {
|
||||
|
||||
const child = this.stream(args, { env });
|
||||
|
||||
const onExit = (exitCode: number) => {
|
||||
const onClose = (exitCode: number) => {
|
||||
if (exitCode !== 0) {
|
||||
const stderr = stderrData.join('');
|
||||
return e(new GitError({
|
||||
@@ -1975,7 +1975,7 @@ export class Repository {
|
||||
parser.update(raw);
|
||||
|
||||
if (limit !== 0 && parser.status.length > limit) {
|
||||
child.removeListener('exit', onExit);
|
||||
child.removeListener('close', onClose);
|
||||
child.stdout!.removeListener('data', onStdoutData);
|
||||
child.kill();
|
||||
|
||||
@@ -1991,7 +1991,7 @@ export class Repository {
|
||||
child.stderr!.on('data', raw => stderrData.push(raw as string));
|
||||
|
||||
child.on('error', cpErrorHandler(e));
|
||||
child.on('exit', onExit);
|
||||
child.on('close', onClose);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user