Enable users to view and apply changes from worktree to main repo, per file (#263927)

* enable compare with workspace command

* add context to command

* clean up
This commit is contained in:
Christy 😺
2025-09-02 06:28:07 -07:00
committed by GitHub
parent 05c2fd5932
commit f562c9d3e8
4 changed files with 67 additions and 13 deletions

View File

@@ -136,6 +136,11 @@
"icon": "$(refresh)",
"enablement": "!operationInProgress"
},
{
"command": "git.compareWithWorkspace",
"title": "%command.compareWithWorkspace%",
"category": "Git"
},
{
"command": "git.openChange",
"title": "%command.openChange%",
@@ -1982,6 +1987,11 @@
"when": "scmProvider == git && scmResourceGroup == index",
"group": "2_view@2"
},
{
"command": "git.compareWithWorkspace",
"when": "scmProvider == git && scmResourceGroup == index && scmResourceState == worktree",
"group": "worktree_diff"
},
{
"command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == index && config.git.showInlineOpenFileAction && config.git.openDiffOnClick",
@@ -2027,6 +2037,11 @@
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline@2"
},
{
"command": "git.compareWithWorkspace",
"when": "scmProvider == git && scmResourceGroup == workingTree && scmResourceState == worktree",
"group": "worktree_diff"
},
{
"command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.showInlineOpenFileAction && config.git.openDiffOnClick",