Git: Delete Worktree... command for command palette only (#256827)

* Delete worktree picker  command palette

* clean up

* Only allow delete worktree picker from main repository

* Find main repository

* resolve hygiene formatting issues
This commit is contained in:
Christy 😺
2025-07-21 07:48:08 -07:00
committed by GitHub
parent 88b415f570
commit 6187e6deb7
3 changed files with 74 additions and 1 deletions

View File

@@ -551,6 +551,12 @@
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.deleteWorktreeFromPalette",
"title": "%command.deleteWorktreeFromPalette%",
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.graph.deleteTag",
"title": "%command.graphDeleteTag%",
@@ -1309,6 +1315,10 @@
"command": "git.deleteWorktree",
"when": "false"
},
{
"command": "git.deleteWorktreeFromPalette",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount > 1"
},
{
"command": "git.deleteRemoteTag",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"