mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Merge branch '24283-adding-never-show-in-git-extension' of https://github.com/timbanaveen/vscode into timbanaveen-24283-adding-never-show-in-git-extension
This commit is contained in:
commit
09400d8073
|
@ -65,12 +65,25 @@ async function init(context: ExtensionContext, disposables: Disposable[]): Promi
|
|||
model
|
||||
);
|
||||
|
||||
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 choice = await window.showWarningMessage(localize('git20', "You seem to have git {0} installed. Code works best with git >= 2", info.version), update);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue