From 7dbb14e97450da06824287a2321dfb0d136e8224 Mon Sep 17 00:00:00 2001 From: Dor Mesica Date: Wed, 1 Apr 2020 15:26:26 +0300 Subject: [PATCH 1/2] Added a message before dropping a stash. --- extensions/git/src/commands.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 451ff28afca5d..dc79653675bf1 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -2325,6 +2325,16 @@ export class CommandCenter { return; } + // request confirmation for the operation + const yes = localize('yes', "Yes"); + const result = await window.showWarningMessage( + localize('sure drop', "Are you sure you want to drop the stash: {0}?", stash.description), + yes + ); + if (result !== 'Yes') { + return; + } + await repository.dropStash(stash.index); } From b98595ac75cd333900d16fe142049cea572a5691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Thu, 5 Nov 2020 15:20:07 +0100 Subject: [PATCH 2/2] Update extensions/git/src/commands.ts --- extensions/git/src/commands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index dc79653675bf1..612fd469a3886 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -2331,7 +2331,7 @@ export class CommandCenter { localize('sure drop', "Are you sure you want to drop the stash: {0}?", stash.description), yes ); - if (result !== 'Yes') { + if (result !== yes) { return; }