提交 530765e0 编写于 作者: J Joao Moreno

Merge branch 'BattleBas-newAutoRepositoryDetection'

......@@ -828,6 +828,11 @@
"default": null,
"isExecutable": true
},
"git.autoRepositoryDetection": {
"type": "boolean",
"description": "%config.autoRepositoryDetection%",
"default": true
},
"git.autorefresh": {
"type": "boolean",
"description": "%config.autorefresh%",
......
......@@ -49,6 +49,7 @@
"command.stashPopLatest": "Pop Latest Stash",
"config.enabled": "Whether git is enabled",
"config.path": "Path to the git executable",
"config.autoRepositoryDetection": "Whether repositories should be automatically detected",
"config.autorefresh": "Whether auto refreshing is enabled",
"config.autofetch": "Whether auto fetching is enabled",
"config.enableLongCommitWarning": "Whether long commit messages should be warned about",
......
......@@ -149,6 +149,13 @@ export class Model {
}
private onDidChangeVisibleTextEditors(editors: TextEditor[]): void {
const config = workspace.getConfiguration('git');
const enabled = config.get<boolean>('autoRepositoryDetection') === true;
if (!enabled) {
return;
}
editors.forEach(editor => {
const uri = editor.document.uri;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册