From a4f6aadf82df658fe63d4bc9bd2220f34a7927a2 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Tue, 6 May 2025 12:12:53 +0000 Subject: [PATCH] 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 --- extensions/git/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 3102a464853..21e90d59ee4 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -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": [