diff --git a/extensions/git/package.json b/extensions/git/package.json index 4e26cff75f4..c2745213c68 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -1882,6 +1882,11 @@ "command": "git.viewAllChanges", "when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled", "group": "inline@1" + }, + { + "command": "git.viewAllChanges", + "when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled", + "group": "1_view@1" } ], "scm/incomingChanges/historyItem/context": [ @@ -1889,6 +1894,11 @@ "command": "git.viewCommit", "when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled", "group": "inline@1" + }, + { + "command": "git.viewCommit", + "when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled", + "group": "1_view@1" } ], "scm/outgoingChanges": [ @@ -1906,13 +1916,13 @@ "scm/outgoingChanges/context": [ { "command": "git.pushRef", - "group": "1_modification@1", - "when": "scmProvider == git && scmHistoryItemGroupHasUpstream" + "when": "scmProvider == git && scmHistoryItemGroupHasUpstream", + "group": "1_modification@1" }, { "command": "git.publish", - "group": "1_modification@1", - "when": "scmProvider == git && !scmHistoryItemGroupHasUpstream" + "when": "scmProvider == git && !scmHistoryItemGroupHasUpstream", + "group": "1_modification@1" } ], "scm/outgoingChanges/allChanges/context": [ @@ -1920,6 +1930,11 @@ "command": "git.viewAllChanges", "when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled", "group": "inline@1" + }, + { + "command": "git.viewAllChanges", + "when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled", + "group": "1_view@1" } ], "scm/outgoingChanges/historyItem/context": [ @@ -1927,6 +1942,11 @@ "command": "git.viewCommit", "when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled", "group": "inline@1" + }, + { + "command": "git.viewCommit", + "when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled", + "group": "1_view@1" } ], "editor/title": [ diff --git a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts index ca7a033fdcd..e075d69cca4 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts @@ -3222,6 +3222,13 @@ export class SCMViewPane extends ViewPane { actionRunner = new HistoryItemGroupActionRunner(); createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, actions); } + } else if (isSCMHistoryItemTreeElement(element)) { + const menus = this.scmViewService.menus.getRepositoryMenus(element.historyItemGroup.repository.provider); + const menu = menus.historyProviderMenu?.getHistoryItemMenu(element); + if (menu) { + actionRunner = new HistoryItemActionRunner(); + actions = collectContextMenuActions(menu); + } } actionRunner.onWillRun(() => this.tree.domFocus());