diff --git a/extensions/git/package.json b/extensions/git/package.json index 9a723045468..410fb6f0aa9 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -966,6 +966,11 @@ "default": true, "description": "%config.showInlineOpenFileAction%" }, + "git.showPushSuccessNotification": { + "type": "boolean", + "description": "%config.showPushSuccessNotification%", + "default": false + }, "git.inputValidation": { "type": "string", "enum": [ diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 9b1a2332d1f..db59b505086 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -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.", "colors.added": "Color for added resources.", @@ -78,4 +79,4 @@ "colors.ignored": "Color for ignored resources.", "colors.conflict": "Color for resources with conflicts.", "colors.submodule": "Color for submodule resources." -} \ No newline at end of file +} diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 9d60c38e16a..3eb6f857899 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1395,6 +1395,10 @@ export class CommandCenter { try { await repository.push(repository.HEAD); + const gitConfig = workspace.getConfiguration('git'); + if (gitConfig.get('showPushSuccessNotification')) { + window.showInformationMessage(localize('push success', "Successfully pushed.")); + } } catch (err) { if (err.gitErrorCode !== GitErrorCodes.NoUpstreamBranch) { throw err;