提交 da1a35aa 编写于 作者: J Joao Moreno

Merge commit 'refs/pull/47890/head' of github.com:Microsoft/vscode into pr/47890

......@@ -1001,6 +1001,12 @@
"scope": "resource",
"default": false,
"description": "%config.alwaysSignOff%"
},
"git.ignoreRepositories": {
"type": "array",
"default": [],
"scope": "window",
"description": "%config.ignoredRepositories%"
}
}
},
......
......@@ -74,10 +74,11 @@
"colors.added": "Color for added resources.",
"config.detectSubmodulesLimit": "Controls the limit of git submodules detected.",
"config.alwaysSignOff": "Controls the signoff flag for all commits",
"config.ignoredRepositories": "List of git repositories to ignore",
"colors.modified": "Color for modified resources.",
"colors.deleted": "Color for deleted resources.",
"colors.untracked": "Color for untracked resources.",
"colors.ignored": "Color for ignored resources.",
"colors.conflict": "Color for resources with conflicts.",
"colors.submodule": "Color for submodule resources."
}
}
\ No newline at end of file
......@@ -190,6 +190,7 @@ export class Model {
const config = workspace.getConfiguration('git', Uri.file(path));
const enabled = config.get<boolean>('enabled') === true;
const ignoredRepos = new Set(config.get<Array<string>>('ignoreRepositories'));
if (!enabled) {
return;
......@@ -207,6 +208,10 @@ export class Model {
return;
}
if (ignoredRepos.has(rawRoot)) {
return;
}
const repository = new Repository(this.git.open(repositoryRoot), this.globalState);
this.open(repository);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册