Git - disable "unstage selected ranges" and "unstage changes" commands in the editor/peek view (#248202)

* Git - disable "unstage selected ranges" command in the editor

* Disable the "Unstage Changes" command
This commit is contained in:
Ladislau Szomoru
2025-05-06 12:12:53 +00:00
committed by GitHub
parent 7705a432df
commit a4f6aadf82

View File

@@ -977,7 +977,7 @@
"command": "git.unstageSelectedRanges",
"key": "ctrl+k ctrl+n",
"mac": "cmd+k cmd+n",
"when": "editorTextFocus && isInDiffEditor && isInDiffRightEditor && (resourceScheme == file || resourceScheme == git)"
"when": "editorTextFocus && isInDiffEditor && isInDiffRightEditor && resourceScheme == git"
},
{
"command": "git.revertSelectedRanges",
@@ -1082,7 +1082,7 @@
},
{
"command": "git.unstageSelectedRanges",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && (resourceScheme == file || resourceScheme == git)"
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && resourceScheme == git"
},
{
"command": "git.unstageChange",
@@ -2238,7 +2238,7 @@
},
{
"command": "git.unstageChange",
"when": "config.git.enabled && !git.missing && originalResource =~ /^git\\:.*%22ref%22%3A%22HEAD%22%7D$/"
"when": "false"
}
],
"timeline/item/context": [