ソースを参照

Closes #1505: open folder history on root folders

main
Eric Amodio 3年前
コミット
7a272ad30f
3個のファイルの変更12行の追加1行の削除
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -1
      package.json
  3. +10
    -0
      src/views/nodes/fileHistoryNode.ts

+ 1
- 0
CHANGELOG.md ファイルの表示

@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Added
- Adds the ability to filter comparisons to show only either the left-side or right-side file differences
- Adds the _Open Folder History_ command to root folders — closes [#1505](https://github.com/eamodio/vscode-gitlens/issues/1505)
### Changed

+ 1
- 1
package.json ファイルの表示

@ -6824,7 +6824,7 @@
},
{
"command": "gitlens.openFolderHistory",
"when": "!explorerResourceIsRoot && explorerResourceIsFolder && gitlens:enabled && config.gitlens.menus.explorer.history",
"when": "explorerResourceIsFolder && gitlens:enabled && config.gitlens.menus.explorer.history",
"group": "4_timeline@2"
},
{

+ 10
- 0
src/views/nodes/fileHistoryNode.ts ファイルの表示

@ -1,4 +1,5 @@
'use strict';
import * as paths from 'path';
import { Disposable, TreeItem, TreeItemCollapsibleState, window } from 'vscode';
import { LoadMoreNode, MessageNode } from './common';
import { CommitNode } from './commitNode';
@ -146,6 +147,15 @@ export class FileHistoryNode extends SubscribeableViewNode impl
}
get label() {
// Check if this is a base folder
if (this.uri.fileName === '') {
return `${paths.basename(this.uri.fsPath)}${
this.uri.sha
? ` ${this.uri.sha === GitRevision.deletedOrMissing ? this.uri.shortSha : `(${this.uri.shortSha})`}`
: ''
}`;
}
return `${this.uri.fileName}${
this.uri.sha
? ` ${this.uri.sha === GitRevision.deletedOrMissing ? this.uri.shortSha : `(${this.uri.shortSha})`}`

読み込み中…
キャンセル
保存