Open worktree in current or new window command (#257139)

* open worktree in window

* open worktree refinements
This commit is contained in:
Christy 😺
2025-07-21 11:46:07 -07:00
committed by GitHub
parent dd45ba7b1f
commit c937d1d05f
3 changed files with 63 additions and 0 deletions

View File

@@ -117,6 +117,18 @@
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.openWorktree",
"title": "%command.openWorktree%",
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.openWorktreeInNewWindow",
"title": "%command.openWorktreeInNewWindow%",
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.refresh",
"title": "%command.refresh%",
@@ -1035,6 +1047,14 @@
"command": "git.closeOtherRepositories",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount > 1"
},
{
"command": "git.openWorktree",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount > 1"
},
{
"command": "git.openWorktreeInNewWindow",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount > 1"
},
{
"command": "git.refresh",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"
@@ -1667,6 +1687,16 @@
"command": "git.closeOtherRepositories",
"group": "navigation@2",
"when": "scmProvider == git && gitOpenRepositoryCount > 1"
},
{
"command": "git.openWorktree",
"group": "worktree@1",
"when": "scmProvider == git && gitOpenRepositoryCount > 1"
},
{
"command": "git.openWorktreeInNewWindow",
"group": "worktree@2",
"when": "scmProvider == git && gitOpenRepositoryCount > 1"
}
],
"scm/resourceGroup/context": [
@@ -2575,6 +2605,16 @@
}
],
"git.worktrees": [
{
"when": "scmProviderContext == worktree",
"command": "git.openWorktree",
"group": "openWorktrees@1"
},
{
"when": "scmProviderContext == worktree",
"command": "git.openWorktreeInNewWindow",
"group": "openWorktrees@2"
},
{
"when": "scmProviderContext == repository",
"command": "git.createWorktree",