Git - add more commands to the graph context menu (#237811)

* Git - add "Delete Branch" and "Delete Tag" actions

* Git - update the graph cherry pick command
This commit is contained in:
Ladislau Szomoru
2025-01-13 17:20:46 +01:00
committed by GitHub
parent 78f24d856a
commit eaa1502b23
3 changed files with 79 additions and 23 deletions

View File

@@ -448,14 +448,14 @@
"enablement": "!operationInProgress"
},
{
"command": "git.checkoutDetached",
"title": "%command.checkoutDetached%",
"command": "git.graph.checkout",
"title": "%command.graphCheckout%",
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.graph.checkout",
"title": "%command.graphCheckout%",
"command": "git.checkoutDetached",
"title": "%command.checkoutDetached%",
"category": "Git",
"enablement": "!operationInProgress"
},
@@ -483,6 +483,12 @@
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.graph.deleteBranch",
"title": "%command.graphDeleteBranch%",
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.renameBranch",
"title": "%command.renameBranch%",
@@ -519,6 +525,12 @@
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.graph.deleteTag",
"title": "%command.graphDeleteTag%",
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.deleteRemoteTag",
"title": "%command.deleteRemoteTag%",
@@ -632,8 +644,8 @@
"enablement": "!operationInProgress"
},
{
"command": "git.cherryPickRef",
"title": "%command.cherryPickRef%",
"command": "git.graph.cherryPick",
"title": "%command.graphCherryPick%",
"category": "Git",
"enablement": "!operationInProgress"
},
@@ -1474,7 +1486,15 @@
"when": "false"
},
{
"command": "git.cherryPickRef",
"command": "git.graph.deleteBranch",
"when": "false"
},
{
"command": "git.graph.deleteTag",
"when": "false"
},
{
"command": "git.graph.cherryPick",
"when": "false"
},
{
@@ -2001,20 +2021,20 @@
"when": "scmProvider == git",
"group": "1_checkout@2"
},
{
"command": "git.createTag",
"when": "scmProvider == git",
"group": "2_create@1"
},
{
"command": "git.branch",
"when": "scmProvider == git",
"group": "2_create@2"
"group": "2_branch@2"
},
{
"command": "git.cherryPickRef",
"command": "git.createTag",
"when": "scmProvider == git",
"group": "3_modify@1"
"group": "3_tag@1"
},
{
"command": "git.graph.cherryPick",
"when": "scmProvider == git",
"group": "4_modify@1"
},
{
"command": "git.copyCommitId",
@@ -2032,6 +2052,16 @@
"command": "git.graph.checkout",
"when": "scmProvider == git",
"group": "1_checkout@1"
},
{
"command": "git.graph.deleteBranch",
"when": "scmProvider == git && scmHistoryItemRef =~ /^refs\\/heads\\//",
"group": "2_branch@2"
},
{
"command": "git.graph.deleteTag",
"when": "scmProvider == git && scmHistoryItemRef =~ /^refs\\/tags\\//",
"group": "3_tag@2"
}
],
"editor/title": [