Git - Add commands to the editor title to accept/discard commit message (#153692)

Add commands to the editor title to accept/discard commit message
This commit is contained in:
Ladislau Szomoru
2022-06-29 16:00:09 +02:00
committed by GitHub
parent 6d4dae4873
commit 8045df1b94
3 changed files with 77 additions and 0 deletions

View File

@@ -307,6 +307,18 @@
"category": "Git",
"enablement": "!commitInProgress"
},
{
"command": "git.commitMessageAccept",
"title": "%command.commitMessageAccept%",
"icon": "$(check)",
"category": "Git"
},
{
"command": "git.commitMessageDiscard",
"title": "%command.commitMessageDiscard%",
"icon": "$(discard)",
"category": "Git"
},
{
"command": "git.restoreCommitTemplate",
"title": "%command.restoreCommitTemplate%",
@@ -796,6 +808,14 @@
"command": "git.restoreCommitTemplate",
"when": "false"
},
{
"command": "git.commitMessageAccept",
"when": "false"
},
{
"command": "git.commitMessageDiscard",
"when": "false"
},
{
"command": "git.revealInExplorer",
"when": "false"
@@ -1481,6 +1501,16 @@
"group": "navigation",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && scmActiveResourceHasChanges"
},
{
"command": "git.commitMessageAccept",
"group": "navigation",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && editorLangId == git-commit && commitInProgress"
},
{
"command": "git.commitMessageDiscard",
"group": "navigation",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && editorLangId == git-commit && commitInProgress"
},
{
"command": "git.stageSelectedRanges",
"group": "2_git@1",