mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
fixes #45911
This commit is contained in:
parent
19001175dd
commit
dafdde11c9
|
@ -235,10 +235,9 @@ export class Model {
|
|||
if (repository.submodules.length > submodulesLimit) {
|
||||
window.showWarningMessage(localize('too many submodules', "The '{0}' repository has {1} submodules which won't be opened automatically. You can still open each one individually by opening a file within.", path.basename(repository.root), repository.submodules.length));
|
||||
statusListener.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
this.scanSubmodules(repository);
|
||||
this.scanSubmodules(repository, submodulesLimit);
|
||||
};
|
||||
|
||||
const statusListener = repository.onDidRunGitStatus(checkForSubmodules);
|
||||
|
@ -260,7 +259,7 @@ export class Model {
|
|||
this._onDidOpenRepository.fire(repository);
|
||||
}
|
||||
|
||||
private scanSubmodules(repository: Repository): void {
|
||||
private scanSubmodules(repository: Repository, limit: number): void {
|
||||
const shouldScanSubmodules = workspace
|
||||
.getConfiguration('git', Uri.file(repository.root))
|
||||
.get<boolean>('detectSubmodules') === true;
|
||||
|
@ -270,6 +269,7 @@ export class Model {
|
|||
}
|
||||
|
||||
repository.submodules
|
||||
.slice(0, limit)
|
||||
.map(r => path.join(repository.root, r.path))
|
||||
.forEach(p => this.eventuallyScanPossibleGitRepository(p));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue