mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
fixes #102455
This commit is contained in:
parent
b50e599a14
commit
2f2ba0d764
|
@ -1501,6 +1501,11 @@
|
|||
"description": "%config.ignoreMissingGitWarning%",
|
||||
"default": false
|
||||
},
|
||||
"git.ignoreWindowsGit27Warning": {
|
||||
"type": "boolean",
|
||||
"description": "%config.ignoreWindowsGit27Warning%",
|
||||
"default": false
|
||||
},
|
||||
"git.ignoreLimitWarning": {
|
||||
"type": "boolean",
|
||||
"description": "%config.ignoreLimitWarning%",
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
"config.branchWhitespaceChar": "The character to replace whitespace in new branch names.",
|
||||
"config.ignoreLegacyWarning": "Ignores the legacy Git warning.",
|
||||
"config.ignoreMissingGitWarning": "Ignores the warning when Git is missing.",
|
||||
"config.ignoreWindowsGit27Warning": "Ignores the warning when Git 2.25 - 2.26 is installed on Windows.",
|
||||
"config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository.",
|
||||
"config.defaultCloneDirectory": "The default location to clone a git repository.",
|
||||
"config.enableSmartCommit": "Commit all changes when there are no staged changes.",
|
||||
|
|
|
@ -208,14 +208,25 @@ async function checkGitWindows(info: IGit): Promise<void> {
|
|||
return;
|
||||
}
|
||||
|
||||
const config = workspace.getConfiguration('git');
|
||||
const shouldIgnore = config.get<boolean>('ignoreWindowsGit27Warning') === true;
|
||||
|
||||
if (shouldIgnore) {
|
||||
return;
|
||||
}
|
||||
|
||||
const update = localize('updateGit', "Update Git");
|
||||
const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||
const choice = await window.showWarningMessage(
|
||||
localize('git2526', "There are known issues with the installed Git {0}. Please update to Git >= 2.27 for the git features to work correctly.", info.version),
|
||||
update
|
||||
update,
|
||||
neverShowAgain
|
||||
);
|
||||
|
||||
if (choice === update) {
|
||||
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
||||
} else if (choice === neverShowAgain) {
|
||||
await config.update('ignoreWindowsGit27Warning', true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue