Bläddra i källkod

Removes insiders flag from stash commands

main
Eric Amodio 7 år sedan
förälder
incheckning
77651701aa
6 ändrade filer med 4 tillägg och 7 borttagningar
  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 Visa fil

@ -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 Visa fil

@ -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 Visa fil

@ -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 Visa fil

@ -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 Visa fil

@ -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 Visa fil

@ -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`

Laddar…
Avbryt
Spara