From 1b4350e476132c961f30b3f9e95f2bc8e5ca1281 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 3 Sep 2017 13:23:17 -0400 Subject: [PATCH] Removes Stash Unstaged Changes option Changes Stash Changes icon to a + --- src/commands/stashSave.ts | 9 ++------- src/quickPicks/stashList.ts | 13 +------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/commands/stashSave.ts b/src/commands/stashSave.ts index 2623b7d..9a0e237 100644 --- a/src/commands/stashSave.ts +++ b/src/commands/stashSave.ts @@ -8,7 +8,6 @@ import { CommandQuickPickItem } from '../quickPicks'; export interface StashSaveCommandArgs { message?: string; - unstagedOnly?: boolean; uris?: Uri[]; goBackCommand?: CommandQuickPickItem; @@ -36,16 +35,12 @@ export class StashSaveCommand extends Command { return this.execute(args); } - async execute(args: StashSaveCommandArgs = { unstagedOnly: false }) { + async execute(args: StashSaveCommandArgs = { }) { if (!this.git.repoPath) return undefined; - args = { ...args }; - if (args.unstagedOnly === undefined) { - args.unstagedOnly = false; - } - try { if (args.message == null) { + args = { ...args }; args.message = await window.showInputBox({ prompt: `Please provide a stash message`, placeHolder: `Stash message` diff --git a/src/quickPicks/stashList.ts b/src/quickPicks/stashList.ts index 4e480b2..d222215 100644 --- a/src/quickPicks/stashList.ts +++ b/src/quickPicks/stashList.ts @@ -14,21 +14,10 @@ export class StashListQuickPick { if (mode === 'list') { items.splice(0, 0, new CommandQuickPickItem({ - label: `$(repo-push) Stash Unstaged Changes`, - description: `${Strings.pad(GlyphChars.Dash, 2, 3)} stashes only unstaged changes` - }, Commands.StashSave, [ - { - unstagedOnly: true, - goBackCommand: currentCommand - } as StashSaveCommandArgs - ])); - - items.splice(0, 0, new CommandQuickPickItem({ - label: `$(repo-force-push) Stash Changes`, + label: `$(plus) Stash Changes`, description: `${Strings.pad(GlyphChars.Dash, 2, 3)} stashes all changes` }, Commands.StashSave, [ { - unstagedOnly: false, goBackCommand: currentCommand } as StashSaveCommandArgs ]));