Parcourir la source

Removes insiders flag from stash commands

main
Eric Amodio il y a 7 ans
Parent
révision
77651701aa
6 fichiers modifiés avec 4 ajouts et 7 suppressions
  1. +2
    -2
      package.json
  2. +0
    -1
      src/commands/stashApply.ts
  3. +0
    -1
      src/commands/stashDelete.ts
  4. +0
    -1
      src/commands/stashSave.ts
  5. +1
    -1
      src/quickPicks/commitDetails.ts
  6. +1
    -1
      src/quickPicks/stashList.ts

+ 2
- 2
package.json Voir le fichier

@ -645,11 +645,11 @@
},
{
"command": "gitlens.stashApply",
"when": "gitlens:enabled && config.gitlens.insiders"
"when": "gitlens:enabled"
},
{
"command": "gitlens.stashSave",
"when": "gitlens:enabled && config.gitlens.insiders"
"when": "gitlens:enabled"
}
],
"explorer/context": [

+ 0
- 1
src/commands/stashApply.ts Voir le fichier

@ -21,7 +21,6 @@ export class StashApplyCommand extends Command {
}
async execute(args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }) {
if (!this.git.config.insiders) return undefined;
if (!this.git.repoPath) return undefined;
if (args.stashItem === undefined || args.stashItem.stashName === undefined) {

+ 0
- 1
src/commands/stashDelete.ts Voir le fichier

@ -19,7 +19,6 @@ export class StashDeleteCommand extends Command {
}
async execute(args: StashDeleteCommandArgs = { confirm: true }) {
if (!this.git.config.insiders) return undefined;
if (!this.git.repoPath) return undefined;
if (args.stashItem === undefined || args.stashItem.stashName === undefined) return undefined;

+ 0
- 1
src/commands/stashSave.ts Voir le fichier

@ -19,7 +19,6 @@ export class StashSaveCommand extends Command {
}
async execute(args: StashSaveCommandArgs = { unstagedOnly : false }) {
if (!this.git.config.insiders) return undefined;
if (!this.git.repoPath) return undefined;
if (args.unstagedOnly === undefined) {

+ 1
- 1
src/quickPicks/commitDetails.ts Voir le fichier

@ -110,7 +110,7 @@ export class CommitDetailsQuickPick {
let index = 0;
if (stash && git.config.insiders) {
if (stash) {
items.splice(index++, 0, new CommandQuickPickItem({
label: `$(git-pull-request) Apply Stashed Changes`,
description: `\u00a0 \u2014 \u00a0\u00a0 ${commit.message}`

+ 1
- 1
src/quickPicks/stashList.ts Voir le fichier

@ -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> {
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({
label: `$(repo-push) Stash Unstaged Changes`,
description: `\u00a0 \u2014 \u00a0\u00a0 stashes only unstaged changes`

Chargement…
Annuler
Enregistrer