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

git: recommend 2.0

上级 53e4021d
......@@ -5,7 +5,7 @@
'use strict';
import { ExtensionContext, workspace, window, Disposable } from 'vscode';
import { ExtensionContext, workspace, window, Disposable, commands, Uri } from 'vscode';
import { findGit, Git } from './git';
import { Model } from './model';
import { GitSCMProvider } from './scmProvider';
......@@ -61,6 +61,15 @@ async function init(disposables: Disposable[]): Promise<void> {
mergeDecorator,
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/'));
}
}
}
export function activate(context: ExtensionContext): any {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册