mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-13 17:23:11 -05:00
Removes setting & command to show/hide stashes view
This commit is contained in:
14
CHANGELOG.md
14
CHANGELOG.md
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
16
package.json
16
package.json
@@ -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": {
|
||||
@@ -1172,10 +1162,6 @@
|
||||
"command": "gitlens.gitExplorer.refresh",
|
||||
"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,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<ExplorerNode> {
|
||||
|
||||
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<ExplorerNode> {
|
||||
// }
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user