Git - rename "Open Stash" to "Preview Stash" (#201973)

* Git - rename "Open Stash" to "Preview Stash"

* Add Preview Stash command to the "..." menu
This commit is contained in:
Ladislau Szomoru 2024-01-08 10:59:49 +01:00 committed by GitHub
parent cfebdd863a
commit f8616b9a2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 7 deletions

View file

@ -675,8 +675,8 @@
"enablement": "!operationInProgress"
},
{
"command": "git.stashOpen",
"title": "%command.stashOpen%",
"command": "git.stashPreview",
"title": "%command.stashPreview%",
"category": "Git",
"enablement": "!operationInProgress"
},
@ -1264,7 +1264,7 @@
"when": "config.git.enabled && !git.missing && git.parentRepositoryCount != 0"
},
{
"command": "git.openStash",
"command": "git.stashPreview",
"when": "config.git.enabled && !git.missing && config.multiDiffEditor.experimental.enabled"
},
{
@ -2103,6 +2103,11 @@
{
"command": "git.stashDropAll",
"group": "4_drop@2"
},
{
"command": "git.stashPreview",
"when": "config.multiDiffEditor.experimental.enabled",
"group": "5_preview@1"
}
],
"git.tags": [

View file

@ -104,7 +104,7 @@
"command.stashApplyLatest": "Apply Latest Stash",
"command.stashDrop": "Drop Stash...",
"command.stashDropAll": "Drop All Stashes...",
"command.stashOpen": "Open Stash...",
"command.stashPreview": "Preview Stash...",
"command.timelineOpenDiff": "Open Changes",
"command.timelineOpenCommit": "Open Commit",
"command.timelineCopyCommitId": "Copy Commit ID",

View file

@ -3535,9 +3535,9 @@ export class CommandCenter {
await repository.dropStash();
}
@command('git.stashOpen', { repository: true })
async stashOpen(repository: Repository): Promise<void> {
const placeHolder = l10n.t('Pick a stash to open');
@command('git.stashPreview', { repository: true })
async stashPreview(repository: Repository): Promise<void> {
const placeHolder = l10n.t('Pick a stash to preview');
const stash = await this.pickStash(repository, placeHolder);
if (!stash) {