mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-16 10:58:34 -05:00
Removes insiders flag from stash commands
This commit is contained in:
@@ -645,11 +645,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashApply",
|
"command": "gitlens.stashApply",
|
||||||
"when": "gitlens:enabled && config.gitlens.insiders"
|
"when": "gitlens:enabled"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashSave",
|
"command": "gitlens.stashSave",
|
||||||
"when": "gitlens:enabled && config.gitlens.insiders"
|
"when": "gitlens:enabled"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"explorer/context": [
|
"explorer/context": [
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ export class StashApplyCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async execute(args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }) {
|
async execute(args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }) {
|
||||||
if (!this.git.config.insiders) return undefined;
|
|
||||||
if (!this.git.repoPath) return undefined;
|
if (!this.git.repoPath) return undefined;
|
||||||
|
|
||||||
if (args.stashItem === undefined || args.stashItem.stashName === undefined) {
|
if (args.stashItem === undefined || args.stashItem.stashName === undefined) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ export class StashDeleteCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async execute(args: StashDeleteCommandArgs = { confirm: true }) {
|
async execute(args: StashDeleteCommandArgs = { confirm: true }) {
|
||||||
if (!this.git.config.insiders) return undefined;
|
|
||||||
if (!this.git.repoPath) return undefined;
|
if (!this.git.repoPath) return undefined;
|
||||||
|
|
||||||
if (args.stashItem === undefined || args.stashItem.stashName === undefined) return undefined;
|
if (args.stashItem === undefined || args.stashItem.stashName === undefined) return undefined;
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ export class StashSaveCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async execute(args: StashSaveCommandArgs = { unstagedOnly : false }) {
|
async execute(args: StashSaveCommandArgs = { unstagedOnly : false }) {
|
||||||
if (!this.git.config.insiders) return undefined;
|
|
||||||
if (!this.git.repoPath) return undefined;
|
if (!this.git.repoPath) return undefined;
|
||||||
|
|
||||||
if (args.unstagedOnly === undefined) {
|
if (args.unstagedOnly === undefined) {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export class CommitDetailsQuickPick {
|
|||||||
|
|
||||||
let index = 0;
|
let index = 0;
|
||||||
|
|
||||||
if (stash && git.config.insiders) {
|
if (stash) {
|
||||||
items.splice(index++, 0, new CommandQuickPickItem({
|
items.splice(index++, 0, new CommandQuickPickItem({
|
||||||
label: `$(git-pull-request) Apply Stashed Changes`,
|
label: `$(git-pull-request) Apply Stashed Changes`,
|
||||||
description: `\u00a0 \u2014 \u00a0\u00a0 ${commit.message}`
|
description: `\u00a0 \u2014 \u00a0\u00a0 ${commit.message}`
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export class StashListQuickPick {
|
|||||||
static async show(git: GitService, stash: IGitStash, mode: 'list' | 'apply', goBackCommand?: CommandQuickPickItem, currentCommand?: CommandQuickPickItem): Promise<CommitQuickPickItem | CommandQuickPickItem | undefined> {
|
static async show(git: GitService, stash: IGitStash, mode: 'list' | 'apply', goBackCommand?: CommandQuickPickItem, currentCommand?: CommandQuickPickItem): Promise<CommitQuickPickItem | CommandQuickPickItem | undefined> {
|
||||||
const items = ((stash && Array.from(Iterables.map(stash.commits.values(), c => new CommitQuickPickItem(c)))) || []) as (CommitQuickPickItem | CommandQuickPickItem)[];
|
const items = ((stash && Array.from(Iterables.map(stash.commits.values(), c => new CommitQuickPickItem(c)))) || []) as (CommitQuickPickItem | CommandQuickPickItem)[];
|
||||||
|
|
||||||
if (mode === 'list' && git.config.insiders) {
|
if (mode === 'list') {
|
||||||
items.splice(0, 0, new CommandQuickPickItem({
|
items.splice(0, 0, new CommandQuickPickItem({
|
||||||
label: `$(repo-push) Stash Unstaged Changes`,
|
label: `$(repo-push) Stash Unstaged Changes`,
|
||||||
description: `\u00a0 \u2014 \u00a0\u00a0 stashes only unstaged changes`
|
description: `\u00a0 \u2014 \u00a0\u00a0 stashes only unstaged changes`
|
||||||
|
|||||||
Reference in New Issue
Block a user