mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
fixes #56504
This commit is contained in:
@@ -1151,6 +1151,12 @@
|
||||
"scope": "window",
|
||||
"description": "%config.ignoredRepositories%"
|
||||
},
|
||||
"git.scanRepositories": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"scope": "resource",
|
||||
"description": "%config.scanRepositories%"
|
||||
},
|
||||
"git.showProgress": {
|
||||
"type": "boolean",
|
||||
"description": "%config.showProgress%",
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
"config.alwaysShowStagedChangesResourceGroup": "Always show the Staged Changes resource group.",
|
||||
"config.alwaysSignOff": "Controls the signoff flag for all commits.",
|
||||
"config.ignoredRepositories": "List of git repositories to ignore.",
|
||||
"config.scanRepositories": "List of paths to search for git repositories in.",
|
||||
"config.showProgress": "Controls whether git actions should show progress.",
|
||||
"config.rebaseWhenSync": "Use rebase instead of merge when running the sync command.",
|
||||
"config.confirmEmptyCommits": "Always confirm the creation of empty commits.",
|
||||
|
||||
@@ -108,6 +108,18 @@ export class Model {
|
||||
children
|
||||
.filter(child => child !== '.git')
|
||||
.forEach(child => this.openRepository(path.join(root, child)));
|
||||
|
||||
const folderConfig = workspace.getConfiguration('git', folder.uri);
|
||||
const paths = folderConfig.get<string[]>('scanRepositories') || [];
|
||||
|
||||
for (const possibleRepositoryPath of paths) {
|
||||
if (path.isAbsolute(possibleRepositoryPath)) {
|
||||
console.warn(localize('not supported', "Absolute paths not supported in 'git.scanRepositories' setting."));
|
||||
continue;
|
||||
}
|
||||
|
||||
this.openRepository(path.join(root, possibleRepositoryPath));
|
||||
}
|
||||
} catch (err) {
|
||||
// noop
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user