Browse Source

Removes setting & command to show/hide stashes view

main
Eric Amodio 7 years ago
parent
commit
e39bd5dad3
4 changed files with 16 additions and 26 deletions
  1. +14
    -0
      CHANGELOG.md
  2. +0
    -1
      README.md
  3. +1
    -15
      package.json
  4. +1
    -10
      src/views/stashExplorer.ts

+ 14
- 0
CHANGELOG.md View File

@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
## [4.x] - 2017-08-16
## Added
- Adds progress indicator to the `Toggle File Blame Annotations` command (`gitlens.toggleFileBlame`) icon
- Icon pulses while annotations are computed
- Adds active state to the `Toggle File Blame Annotations` command (`gitlens.toggleFileBlame`) icon
- Icon turns orange while the annotations are visible
## Changed
- Changes chat links from Gitter to [Slack](https://join.slack.com/t/vscode-gitlens/shared_invite/MjIxOTgxNDE3NzM0LTE1MDE2Nzk1MTgtMjkwMmZjMzcxNQ)
## Removed
- Removes unneeded `gitlens.stashExplorer.enabled` configuration setting since users can add or remove custom views natively now
- Removes unneeded `Toggle Git Stashed Explorer` command (`gitlens.stashExplorer.toggle`) since users can add or remove custom views natively now
## [4.3.3] - 2017-07-28
## Added
- Adds progress indicator for when computing annotations takes a while

+ 0
- 1
README.md View File

@ -293,7 +293,6 @@ GitLens is highly customizable and provides many configuration settings to allow
|Name | Description
|-----|------------
|`gitlens.stashExplorer.enabled`|Specifies whether or not to show the `Git Stashes` explorer
|`gitlens.stashExplorer.stashFormat`|Specifies the format of stashed changes in the `Git Stashes` explorer <br />Available tokens<br /> ${id} - commit id<br /> ${author} - commit author<br /> ${message} - commit message<br /> ${ago} - relative commit date (e.g. 1 day ago)<br /> ${date} - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)<br /> ${authorAgo} - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|`gitlens.stashExplorer.stashFileFormat`|Specifies the format of a stashed file in the `Git Stashes` explorer <br />Available tokens<br /> ${file} - file name<br /> ${path} - file path

+ 1
- 15
package.json View File

@ -407,11 +407,6 @@
"default": null,
"description": "Specifies how all absolute dates will be formatted by default\nSee https://momentjs.com/docs/#/displaying/format/ for valid formats"
},
"gitlens.stashExplorer.enabled": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not to show the `Git Stashes` explorer"
},
"gitlens.stashExplorer.stashFormat": {
"type": "string",
"default": "${message}",
@ -1011,11 +1006,6 @@
"command": "gitlens.stashExplorer.openFileInRemote",
"title": "Open File in Remote",
"category": "GitLens"
},
{
"command": "gitlens.stashExplorer.toggle",
"title": "Toggle Git Stashes Explorer",
"category": "GitLens"
}
],
"menus": {
@ -1173,10 +1163,6 @@
"when": "gitlens:enabled"
},
{
"command": "gitlens.stashExplorer.toggle",
"when": "gitlens:enabled"
},
{
"command": "gitlens.stashExplorer.refresh",
"when": "gitlens:enabled"
},
@ -1552,7 +1538,7 @@
{
"id": "gitlens.stashExplorer",
"name": "Git Stashes",
"when": "gitlens:enabled && config.gitlens.stashExplorer.enabled"
"when": "gitlens:enabled"
}
]
}

+ 1
- 10
src/views/stashExplorer.ts View File

@ -1,8 +1,7 @@
'use strict';
// import { Functions } from '../system';
import { commands, Event, EventEmitter, ExtensionContext, TreeDataProvider, TreeItem, Uri, workspace } from 'vscode';
import { commands, Event, EventEmitter, ExtensionContext, TreeDataProvider, TreeItem, Uri } from 'vscode';
import { Commands, DiffWithPreviousCommandArgs, openEditor } from '../commands';
import { ExtensionKey, IConfig } from '../configuration';
import { ExplorerNode, StashCommitNode, StashNode } from './explorerNodes';
import { GitService, GitUri } from '../gitService';
@ -20,7 +19,6 @@ export class StashExplorer implements TreeDataProvider {
constructor(private context: ExtensionContext, private git: GitService) {
commands.registerCommand('gitlens.stashExplorer.refresh', this.refresh, this);
commands.registerCommand('gitlens.stashExplorer.toggle', this.toggle, this);
commands.registerCommand('gitlens.stashExplorer.openChanges', this.openChanges, this);
commands.registerCommand('gitlens.stashExplorer.openFile', this.openFile, this);
commands.registerCommand('gitlens.stashExplorer.openStashedFile', this.openStashedFile, this);
@ -62,16 +60,9 @@ export class StashExplorer implements TreeDataProvider {
// }
refresh() {
if (!this.git.config.stashExplorer.enabled) return;
this._onDidChangeTreeData.fire();
}
private toggle() {
const cfg = workspace.getConfiguration().get<IConfig>(ExtensionKey)!;
workspace.getConfiguration(ExtensionKey).update('stashExplorer.enabled', !cfg.stashExplorer.enabled, true);
}
private openChanges(node: StashCommitNode) {
const command = node.getCommand();
if (command === undefined || command.arguments === undefined) return;

||||||
x
 
000:0
Loading…
Cancel
Save