From ee748ab5c8757de6b586ad62ff551eae78f36e5a Mon Sep 17 00:00:00 2001 From: Ivor Huang Date: Thu, 12 Apr 2018 20:48:31 -0400 Subject: [PATCH] implement push success notification for issue #39039 --- extensions/git/package.json | 5 +++++ extensions/git/package.nls.json | 3 ++- extensions/git/src/commands.ts | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index c4a03271ec2..fb5170b607d 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 7f2c43dd233..23ef70fb461 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.", "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." -} \ No newline at end of file +} diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index e37383c4932..5725f10c191 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1376,6 +1376,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;