mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-17 02:51:47 -05:00
Removes Stash Unstaged Changes option
Changes Stash Changes icon to a +
This commit is contained in:
@@ -8,7 +8,6 @@ import { CommandQuickPickItem } from '../quickPicks';
|
|||||||
|
|
||||||
export interface StashSaveCommandArgs {
|
export interface StashSaveCommandArgs {
|
||||||
message?: string;
|
message?: string;
|
||||||
unstagedOnly?: boolean;
|
|
||||||
uris?: Uri[];
|
uris?: Uri[];
|
||||||
|
|
||||||
goBackCommand?: CommandQuickPickItem;
|
goBackCommand?: CommandQuickPickItem;
|
||||||
@@ -36,16 +35,12 @@ export class StashSaveCommand extends Command {
|
|||||||
return this.execute(args);
|
return this.execute(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
async execute(args: StashSaveCommandArgs = { unstagedOnly: false }) {
|
async execute(args: StashSaveCommandArgs = { }) {
|
||||||
if (!this.git.repoPath) return undefined;
|
if (!this.git.repoPath) return undefined;
|
||||||
|
|
||||||
args = { ...args };
|
|
||||||
if (args.unstagedOnly === undefined) {
|
|
||||||
args.unstagedOnly = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (args.message == null) {
|
if (args.message == null) {
|
||||||
|
args = { ...args };
|
||||||
args.message = await window.showInputBox({
|
args.message = await window.showInputBox({
|
||||||
prompt: `Please provide a stash message`,
|
prompt: `Please provide a stash message`,
|
||||||
placeHolder: `Stash message`
|
placeHolder: `Stash message`
|
||||||
|
|||||||
@@ -14,21 +14,10 @@ export class StashListQuickPick {
|
|||||||
|
|
||||||
if (mode === 'list') {
|
if (mode === 'list') {
|
||||||
items.splice(0, 0, new CommandQuickPickItem({
|
items.splice(0, 0, new CommandQuickPickItem({
|
||||||
label: `$(repo-push) Stash Unstaged Changes`,
|
label: `$(plus) Stash 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`,
|
|
||||||
description: `${Strings.pad(GlyphChars.Dash, 2, 3)} stashes all changes`
|
description: `${Strings.pad(GlyphChars.Dash, 2, 3)} stashes all changes`
|
||||||
}, Commands.StashSave, [
|
}, Commands.StashSave, [
|
||||||
{
|
{
|
||||||
unstagedOnly: false,
|
|
||||||
goBackCommand: currentCommand
|
goBackCommand: currentCommand
|
||||||
} as StashSaveCommandArgs
|
} as StashSaveCommandArgs
|
||||||
]));
|
]));
|
||||||
|
|||||||
Reference in New Issue
Block a user