Git - Add "View All Changes" action + polish (#202327)

* Make allChanges a distinct historyItem element

* Add allChanges menu contribution

* Add View All Changes command

* Rename "Open Commit" to "View Commit"

* Pass the correct argument when getting "All Changes" node
This commit is contained in:
Ladislau Szomoru
2024-01-12 10:46:52 +01:00
committed by GitHub
parent 5260b20317
commit 2434b7da03
9 changed files with 132 additions and 58 deletions

View File

@@ -709,8 +709,8 @@
"category": "Git"
},
{
"command": "git.timeline.openCommit",
"title": "%command.openCommit%",
"command": "git.timeline.viewCommit",
"title": "%command.viewCommit%",
"icon": "$(diff-multiple)",
"category": "Git"
},
@@ -775,8 +775,15 @@
"category": "Git"
},
{
"command": "git.openCommit",
"title": "%command.openCommit%",
"command": "git.viewCommit",
"title": "%command.viewCommit%",
"icon": "$(diff-multiple)",
"category": "Git",
"enablement": "!operationInProgress"
},
{
"command": "git.viewAllChanges",
"title": "%command.viewAllChanges%",
"icon": "$(diff-multiple)",
"category": "Git",
"enablement": "!operationInProgress"
@@ -1229,7 +1236,7 @@
"when": "false"
},
{
"command": "git.timeline.openCommit",
"command": "git.timeline.viewCommit",
"when": "false"
},
{
@@ -1265,7 +1272,11 @@
"when": "config.git.enabled && !git.missing && config.multiDiffEditor.experimental.enabled"
},
{
"command": "git.openCommit",
"command": "git.viewCommit",
"when": "false"
},
{
"command": "git.viewAllChanges",
"when": "false"
}
],
@@ -1734,16 +1745,30 @@
"group": "1_modification@3"
}
],
"scm/incomingChanges/allChanges/context": [
{
"command": "git.viewAllChanges",
"when": "scmProvider == git && config.multiDiffEditor.experimental.enabled",
"group": "inline@1"
}
],
"scm/incomingChanges/historyItem/context": [
{
"command": "git.openCommit",
"command": "git.viewCommit",
"when": "scmProvider == git && config.multiDiffEditor.experimental.enabled",
"group": "inline@1"
}
],
"scm/outgoingChanges/allChanges/context": [
{
"command": "git.viewAllChanges",
"when": "scmProvider == git && config.multiDiffEditor.experimental.enabled",
"group": "inline@1"
}
],
"scm/outgoingChanges/historyItem/context": [
{
"command": "git.openCommit",
"command": "git.viewCommit",
"when": "scmProvider == git && config.multiDiffEditor.experimental.enabled",
"group": "inline@1"
}
@@ -1830,7 +1855,7 @@
],
"timeline/item/context": [
{
"command": "git.timeline.openCommit",
"command": "git.timeline.viewCommit",
"group": "inline",
"when": "config.git.enabled && !git.missing && timelineItem =~ /git:file:commit\\b/ && !listMultiSelection && config.multiDiffEditor.experimental.enabled"
},
@@ -1840,7 +1865,7 @@
"when": "config.git.enabled && !git.missing && timelineItem =~ /git:file\\b/ && !listMultiSelection"
},
{
"command": "git.timeline.openCommit",
"command": "git.timeline.viewCommit",
"group": "1_actions@2",
"when": "config.git.enabled && !git.missing && timelineItem =~ /git:file:commit\\b/ && !listMultiSelection && config.multiDiffEditor.experimental.enabled"
},