mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
implement push success notification for issue #39039
This commit is contained in:
parent
7c62e560a2
commit
ee748ab5c8
|
@ -966,6 +966,11 @@
|
|||
"default": true,
|
||||
"description": "%config.showInlineOpenFileAction%"
|
||||
},
|
||||
"git.showPushSuccessNotification": {
|
||||
"type": "boolean",
|
||||
"description": "%config.showPushSuccessNotification%",
|
||||
"default": false
|
||||
},
|
||||
"git.inputValidation": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
"config.decorations.enabled": "Controls if Git contributes colors and badges to the explorer and the open editors view.",
|
||||
"config.promptToSaveFilesBeforeCommit": "Controls whether Git should check for unsaved files before committing.",
|
||||
"config.showInlineOpenFileAction": "Controls whether to show an inline Open File action in the Git changes view.",
|
||||
"config.showPushSuccessNotification": "Controls whether to show a notification when a push is successful.",
|
||||
"config.inputValidation": "Controls when to show commit message input validation.",
|
||||
"config.detectSubmodules": "Controls whether to automatically detect git submodules.",
|
||||
"config.detectSubmodulesLimit": "Controls the limit of git submodules detected.",
|
||||
|
@ -77,4 +78,4 @@
|
|||
"colors.ignored": "Color for ignored resources.",
|
||||
"colors.conflict": "Color for resources with conflicts.",
|
||||
"colors.submodule": "Color for submodule resources."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1376,6 +1376,10 @@ export class CommandCenter {
|
|||
|
||||
try {
|
||||
await repository.push(repository.HEAD);
|
||||
const gitConfig = workspace.getConfiguration('git');
|
||||
if (gitConfig.get<boolean>('showPushSuccessNotification')) {
|
||||
window.showInformationMessage(localize('push success', "Successfully pushed."));
|
||||
}
|
||||
} catch (err) {
|
||||
if (err.gitErrorCode !== GitErrorCodes.NoUpstreamBranch) {
|
||||
throw err;
|
||||
|
|
Loading…
Reference in a new issue