Uses background flag for better perf/mem usage
Filters out deleted resources
This commit is contained in:
parent
ed410a1cc0
commit
6fed1b6383
1 changed files with 11 additions and 7 deletions
|
@ -374,16 +374,20 @@ export class CommandCenter {
|
|||
|
||||
@command('git.openAllChanges', { repository: true })
|
||||
async openChanges(repository: Repository): Promise<void> {
|
||||
[
|
||||
...repository.workingTreeGroup.resourceStates,
|
||||
...repository.untrackedGroup.resourceStates,
|
||||
].forEach(resource => {
|
||||
commands.executeCommand(
|
||||
for (const resource of [...repository.workingTreeGroup.resourceStates, ...repository.untrackedGroup.resourceStates]) {
|
||||
if (
|
||||
resource.type === Status.DELETED || resource.type === Status.DELETED_BY_THEM ||
|
||||
resource.type === Status.DELETED_BY_US || resource.type === Status.BOTH_DELETED
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
void commands.executeCommand(
|
||||
'vscode.open',
|
||||
resource.resourceUri,
|
||||
{ preview: false, }
|
||||
{ background: true, preview: false, }
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async cloneRepository(url?: string, parentPath?: string, options: { recursive?: boolean } = {}): Promise<void> {
|
||||
|
|
Loading…
Reference in a new issue