From 36a79b5ce6bc386e36be5ec32c2f5a0741341e00 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Wed, 15 Jan 2025 17:24:18 +0100 Subject: [PATCH] Git - move stage/unstage commands to the `...` menu (#237966) --- extensions/git/package.json | 60 +++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index db47053cd32..a05c557a2b1 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -2075,16 +2075,6 @@ "group": "navigation", "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInNotebookTextDiffEditor && resourceScheme =~ /^git$|^file$/" }, - { - "command": "git.stage", - "group": "navigation@1", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && git.activeResourceHasUnstagedChanges" - }, - { - "command": "git.unstage", - "group": "navigation@1", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && git.activeResourceHasStagedChanges" - }, { "command": "git.openChange", "group": "navigation@2", @@ -2100,21 +2090,6 @@ "group": "navigation", "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && editorLangId == git-commit" }, - { - "command": "git.stageSelectedRanges", - "group": "2_git@1", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file" - }, - { - "command": "git.unstageSelectedRanges", - "group": "2_git@2", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == git" - }, - { - "command": "git.revertSelectedRanges", - "group": "2_git@3", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file" - }, { "command": "git.stashApplyEditor", "alt": "git.stashPopEditor", @@ -2125,6 +2100,41 @@ "command": "git.stashDropEditor", "group": "navigation@2", "when": "config.git.enabled && !git.missing && resourceScheme == git-stash" + }, + { + "command": "git.stage", + "group": "2_git@1", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && git.activeResourceHasUnstagedChanges" + }, + { + "command": "git.unstage", + "group": "2_git@2", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && git.activeResourceHasStagedChanges" + }, + { + "command": "git.stage", + "group": "2_git@1", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file" + }, + { + "command": "git.stageSelectedRanges", + "group": "2_git@2", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file" + }, + { + "command": "git.unstage", + "group": "2_git@3", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == git" + }, + { + "command": "git.unstageSelectedRanges", + "group": "2_git@4", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == git" + }, + { + "command": "git.revertSelectedRanges", + "group": "2_git@5", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file" } ], "editor/context": [