mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
SCM - do not show "View Commit" or "View All Changes" action for empty commits (#203381)
This commit is contained in:
parent
1a94d0d635
commit
5b91204184
|
@ -1851,14 +1851,14 @@
|
|||
"scm/incomingChanges/allChanges/context": [
|
||||
{
|
||||
"command": "git.viewAllChanges",
|
||||
"when": "scmProvider == git && config.multiDiffEditor.experimental.enabled",
|
||||
"when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled",
|
||||
"group": "inline@1"
|
||||
}
|
||||
],
|
||||
"scm/incomingChanges/historyItem/context": [
|
||||
{
|
||||
"command": "git.viewCommit",
|
||||
"when": "scmProvider == git && config.multiDiffEditor.experimental.enabled",
|
||||
"when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled",
|
||||
"group": "inline@1"
|
||||
}
|
||||
],
|
||||
|
@ -1872,14 +1872,14 @@
|
|||
"scm/outgoingChanges/allChanges/context": [
|
||||
{
|
||||
"command": "git.viewAllChanges",
|
||||
"when": "scmProvider == git && config.multiDiffEditor.experimental.enabled",
|
||||
"when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled",
|
||||
"group": "inline@1"
|
||||
}
|
||||
],
|
||||
"scm/outgoingChanges/historyItem/context": [
|
||||
{
|
||||
"command": "git.viewCommit",
|
||||
"when": "scmProvider == git && config.multiDiffEditor.experimental.enabled",
|
||||
"when": "scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled",
|
||||
"group": "inline@1"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -293,7 +293,11 @@ export class SCMHistoryProviderMenus implements ISCMHistoryProviderMenus, IDispo
|
|||
MenuId.SCMOutgoingChangesHistoryItemContext;
|
||||
}
|
||||
|
||||
result = this.menuService.createMenu(menuId, this.contextKeyService);
|
||||
const contextKeyService = this.contextKeyService.createOverlay([
|
||||
['scmHistoryItemFileCount', historyItem.statistics?.files ?? 0],
|
||||
]);
|
||||
|
||||
result = this.menuService.createMenu(menuId, contextKeyService);
|
||||
this.historyItemMenus.set(historyItem, result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue