SCM Graph - add actions back to the view title (#234091)

* Initial implementation

* Adjust commands and context key computation
This commit is contained in:
Ladislau Szomoru
2024-11-18 12:53:59 +01:00
committed by GitHub
parent 32f6e84cfb
commit 09255216a2
3 changed files with 58 additions and 17 deletions

View File

@@ -567,7 +567,7 @@
"title": "%command.pull%",
"icon": "$(repo-pull)",
"category": "Git",
"enablement": "!operationInProgress"
"enablement": "!operationInProgress && scmCurrentHistoryItemRefInFilter && scmCurrentHistoryItemRefHasRemote"
},
{
"command": "git.push",
@@ -616,7 +616,7 @@
"title": "%command.push%",
"icon": "$(repo-push)",
"category": "Git",
"enablement": "!operationInProgress"
"enablement": "!operationInProgress && scmCurrentHistoryItemRefInFilter && scmCurrentHistoryItemRefHasRemote"
},
{
"command": "git.cherryPick",
@@ -1968,8 +1968,23 @@
"scm/history/title": [
{
"command": "git.fetchAll",
"group": "navigation@999",
"group": "navigation@900",
"when": "scmProvider == git"
},
{
"command": "git.pullRef",
"group": "navigation@901",
"when": "scmProvider == git"
},
{
"command": "git.pushRef",
"when": "scmProvider == git && scmCurrentHistoryItemRefHasRemote",
"group": "navigation@902"
},
{
"command": "git.publish",
"when": "scmProvider == git && !scmCurrentHistoryItemRefHasRemote",
"group": "navigation@903"
}
],
"scm/historyItem/context": [