Skip to content

Commit 2ca71a1

Browse files
authored
Git - disable "unstage selected ranges" and "unstage changes" commands in the editor/peek view (#248217)
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
1 parent 118f9ec commit 2ca71a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extensions/git/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@
977977
"command": "git.unstageSelectedRanges",
978978
"key": "ctrl+k ctrl+n",
979979
"mac": "cmd+k cmd+n",
980-
"when": "editorTextFocus && isInDiffEditor && isInDiffRightEditor && (resourceScheme == file || resourceScheme == git)"
980+
"when": "editorTextFocus && isInDiffEditor && isInDiffRightEditor && resourceScheme == git"
981981
},
982982
{
983983
"command": "git.revertSelectedRanges",
@@ -1082,7 +1082,7 @@
10821082
},
10831083
{
10841084
"command": "git.unstageSelectedRanges",
1085-
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && (resourceScheme == file || resourceScheme == git)"
1085+
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && resourceScheme == git"
10861086
},
10871087
{
10881088
"command": "git.unstageChange",
@@ -2238,7 +2238,7 @@
22382238
},
22392239
{
22402240
"command": "git.unstageChange",
2241-
"when": "config.git.enabled && !git.missing && originalResource =~ /^git\\:.*%22ref%22%3A%22HEAD%22%7D$/"
2241+
"when": "false"
22422242
}
22432243
],
22442244
"timeline/item/context": [

0 commit comments

Comments
 (0)