From 545fc819e68d3cc9b2a91ff40e0525dc49ed0b60 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 26 May 2020 02:33:25 -0400 Subject: [PATCH] Fixes stash drop git command --- src/commands/git/stash.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/git/stash.ts b/src/commands/git/stash.ts index 07700e6..f2ead4b 100644 --- a/src/commands/git/stash.ts +++ b/src/commands/git/stash.ts @@ -381,8 +381,10 @@ export class StashGitCommand extends QuickCommand { const result = yield* this.dropCommandConfirmStep(state, context); if (result === StepResult.Break) continue; + QuickCommand.endSteps(state); try { - void (await state.repo.stashDelete(`stash@{${state.reference.ref}}`)); + // drop can only take a stash index, e.g. `stash@{1}` + void (await state.repo.stashDelete(`stash@{${state.reference.number}}`)); } catch (ex) { Logger.error(ex, context.title);