Skip to content

Commit 38d9443

Browse files
committed
Adds option to reveal working files in Explorer
- Adds a "Reveal in Explorer View" context menu option for staged, unstaged, and conflicted files in the Commit Graph and Commit Details (Inspect) views - Executes the native VS Code command to reveal on-disk files, opening the actual working-tree file rather than a git-revision URI Closes #5387
1 parent 523478e commit 38d9443

5 files changed

Lines changed: 469 additions & 403 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1414
- Adds _Open Changes_, _Open Staged Changes_, and _Open Unstaged Changes_ options for working tree files that have both staged and unstaged changes in the _Inspect_ and _Commit Graph_ views — a partially-staged file appears as a single row but you can now open its staged-only, unstaged-only, or combined diff from the context menu ([#5385](https://github.com/gitkraken/vscode-gitlens/issues/5385))
1515
- Adds a working tree change count badge to the _Commit Graph_ view — mirrors the _Source Control_ view by showing the number of working tree changes on the GitLens panel tab, even while the panel is collapsed; controllable via the new `gitlens.graph.showWorkingTreeBadge` setting ([#5383](https://github.com/gitkraken/vscode-gitlens/issues/5383))
1616
- Adds an _Open in Integrated Terminal_ option for worktrees in the _Commit Graph_ and the _Worktrees_ view — opens the selected worktree's folder in the integrated terminal, matching the action already available for repositories and folders ([#5386](https://github.com/gitkraken/vscode-gitlens/issues/5386))
17+
- Adds a _Reveal in Explorer View_ option for working tree (WIP) files in the _Inspect_ and _Commit Graph_ views — right-click a staged, unstaged, or conflicted working file to reveal and select it in VS Code's Explorer view ([#5387](https://github.com/gitkraken/vscode-gitlens/issues/5387))
1718

1819
### Changed
1920

contributions.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6181,6 +6181,32 @@
61816181
]
61826182
}
61836183
},
6184+
"gitlens.revealFileInExplorer:commitDetails": {
6185+
"label": "Reveal in Explorer View",
6186+
"icon": "$(go-to-file)",
6187+
"menus": {
6188+
"webview/context": [
6189+
{
6190+
"when": "webviewItem =~ /gitlens:file\\b(?=.*?\\b\\+(staged|unstaged|conflict)\\b)/ && webview == gitlens.views.commitDetails",
6191+
"group": "2_gitlens_quickopen_file",
6192+
"order": 5
6193+
}
6194+
]
6195+
}
6196+
},
6197+
"gitlens.revealFileInExplorer:graphDetails": {
6198+
"label": "Reveal in Explorer View",
6199+
"icon": "$(go-to-file)",
6200+
"menus": {
6201+
"webview/context": [
6202+
{
6203+
"when": "webviewItem =~ /gitlens:file\\b(?=.*?\\b\\+(staged|unstaged|conflict)\\b)/ && (webview == gitlens.graph || webview == gitlens.views.graph)",
6204+
"group": "2_gitlens_quickopen_file",
6205+
"order": 5
6206+
}
6207+
]
6208+
}
6209+
},
61846210
"gitlens.reviewChanges:graph": {
61856211
"label": "Review Changes (Preview)...",
61866212
"icon": "$(checklist)",

0 commit comments

Comments
 (0)