提交 09400d80 编写于 作者: J Joao Moreno

Merge branch '24283-adding-never-show-in-git-extension' of...

Merge branch '24283-adding-never-show-in-git-extension' of https://github.com/timbanaveen/vscode into timbanaveen-24283-adding-never-show-in-git-extension
......@@ -65,12 +65,25 @@ async function init(context: ExtensionContext, disposables: Disposable[]): Promi
model
);
if (/^[01]/.test(info.version)) {
const update = localize('updateGit', "Update Git");
const choice = await window.showWarningMessage(localize('git20', "You seem to have git {0} installed. Code works best with git >= 2", info.version), update);
if (choice === update) {
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
const IgnoreOldGitStorageKey = 'settings.extension.git.ignoreOld';
// Check user setting to show older version message
if (!context.globalState.get(IgnoreOldGitStorageKey)) {
if (/^[01]/.test(info.version)) {
const update = localize('updateGit', "Update Git");
const neverShowAgain = localize('neverShowAgain', "Don't show again");
const choice = await window.showWarningMessage(
localize('git20', "You seem to have git {0} installed. Code works best with git >= 2", info.version),
update,
neverShowAgain
);
if (choice === update) {
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
} else if (choice === neverShowAgain) {
context.globalState.update(IgnoreOldGitStorageKey, true);
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册