Skip to content

Commit ab03c4c

Browse files
Merge branch 'main' into enable-debug/watch/context-menu-contribution
2 parents a16e9fc + ff59377 commit ab03c4c

File tree

290 files changed

+8065
-3238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+8065
-3238
lines changed

build/azure-pipelines/product-build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ extends:
178178
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
179179
parameters:
180180
sdl:
181-
binskim:
182-
enabled: false
183-
justificationForDisabling: "BinSkim rebaselining is failing"
184181
tsa:
185182
enabled: true
186183
configFile: $(Build.SourcesDirectory)/build/azure-pipelines/config/tsaoptions.json

build/lib/i18n.resources.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@
5858
"name": "vs/workbench/contrib/commands",
5959
"project": "vscode-workbench"
6060
},
61-
{
62-
"name": "vs/workbench/contrib/mappedEdits",
63-
"project": "vscode-workbench"
64-
},
6561
{
6662
"name": "vs/workbench/contrib/markdown",
6763
"project": "vscode-workbench"

build/lib/stylelint/vscode-known-variables.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,7 @@
912912
"--zoom-factor",
913913
"--test-bar-width",
914914
"--widget-color",
915-
"--text-link-decoration"
915+
"--text-link-decoration",
916+
"--vscode-action-item-auto-timeout"
916917
]
917918
}

extensions/git-base/src/api/api1.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { Command, Disposable, commands } from 'vscode';
6+
import { Disposable, commands } from 'vscode';
77
import { Model } from '../model';
8-
import { getRemoteSourceActions, getRemoteSourceControlHistoryItemCommands, pickRemoteSource } from '../remoteSource';
8+
import { getRemoteSourceActions, pickRemoteSource } from '../remoteSource';
99
import { GitBaseExtensionImpl } from './extension';
1010
import { API, PickRemoteSourceOptions, PickRemoteSourceResult, RemoteSourceAction, RemoteSourceProvider } from './git-base';
1111

@@ -21,10 +21,6 @@ export class ApiImpl implements API {
2121
return getRemoteSourceActions(this._model, url);
2222
}
2323

24-
getRemoteSourceControlHistoryItemCommands(url: string): Promise<Command[]> {
25-
return getRemoteSourceControlHistoryItemCommands(this._model, url);
26-
}
27-
2824
registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable {
2925
return this._model.registerRemoteSourceProvider(provider);
3026
}

extensions/git-base/src/api/git-base.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export { ProviderResult } from 'vscode';
99
export interface API {
1010
registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable;
1111
getRemoteSourceActions(url: string): Promise<RemoteSourceAction[]>;
12-
getRemoteSourceControlHistoryItemCommands(url: string): Promise<Command[]>;
1312
pickRemoteSource(options: PickRemoteSourceOptions): Promise<string | PickRemoteSourceResult | undefined>;
1413
}
1514

@@ -82,7 +81,6 @@ export interface RemoteSourceProvider {
8281

8382
getBranches?(url: string): ProviderResult<string[]>;
8483
getRemoteSourceActions?(url: string): ProviderResult<RemoteSourceAction[]>;
85-
getRemoteSourceControlHistoryItemCommands?(url: string): ProviderResult<Command[]>;
8684
getRecentRemoteSources?(query?: string): ProviderResult<RecentRemoteSource[]>;
8785
getRemoteSources(query?: string): ProviderResult<RemoteSource[]>;
8886
}

extensions/git-base/src/remoteSource.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { QuickPickItem, window, QuickPick, QuickPickItemKind, l10n, Disposable, Command } from 'vscode';
6+
import { QuickPickItem, window, QuickPick, QuickPickItemKind, l10n, Disposable } from 'vscode';
77
import { RemoteSourceProvider, RemoteSource, PickRemoteSourceOptions, PickRemoteSourceResult, RemoteSourceAction } from './api/git-base';
88
import { Model } from './model';
99
import { throttle, debounce } from './decorators';
@@ -123,20 +123,6 @@ export async function getRemoteSourceActions(model: Model, url: string): Promise
123123
return remoteSourceActions;
124124
}
125125

126-
export async function getRemoteSourceControlHistoryItemCommands(model: Model, url: string): Promise<Command[]> {
127-
const providers = model.getRemoteProviders();
128-
129-
const remoteSourceCommands = [];
130-
for (const provider of providers) {
131-
const providerCommands = await provider.getRemoteSourceControlHistoryItemCommands?.(url);
132-
if (providerCommands?.length) {
133-
remoteSourceCommands.push(...providerCommands);
134-
}
135-
}
136-
137-
return remoteSourceCommands;
138-
}
139-
140126
export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions & { branch?: false | undefined }): Promise<string | undefined>;
141127
export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions & { branch: true }): Promise<PickRemoteSourceResult | undefined>;
142128
export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions = {}): Promise<string | PickRemoteSourceResult | undefined> {

extensions/git/package.json

Lines changed: 81 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -448,20 +448,20 @@
448448
"enablement": "!operationInProgress"
449449
},
450450
{
451-
"command": "git.checkoutDetached",
452-
"title": "%command.checkoutDetached%",
451+
"command": "git.graph.checkout",
452+
"title": "%command.graphCheckout%",
453453
"category": "Git",
454454
"enablement": "!operationInProgress"
455455
},
456456
{
457-
"command": "git.checkoutRef",
458-
"title": "%command.checkoutRef%",
457+
"command": "git.checkoutDetached",
458+
"title": "%command.checkoutDetached%",
459459
"category": "Git",
460460
"enablement": "!operationInProgress"
461461
},
462462
{
463-
"command": "git.checkoutRefDetached",
464-
"title": "%command.checkoutRefDetached%",
463+
"command": "git.graph.checkoutDetached",
464+
"title": "%command.graphCheckoutDetached%",
465465
"category": "Git",
466466
"enablement": "!operationInProgress"
467467
},
@@ -483,6 +483,12 @@
483483
"category": "Git",
484484
"enablement": "!operationInProgress"
485485
},
486+
{
487+
"command": "git.graph.deleteBranch",
488+
"title": "%command.graphDeleteBranch%",
489+
"category": "Git",
490+
"enablement": "!operationInProgress"
491+
},
486492
{
487493
"command": "git.renameBranch",
488494
"title": "%command.renameBranch%",
@@ -519,6 +525,12 @@
519525
"category": "Git",
520526
"enablement": "!operationInProgress"
521527
},
528+
{
529+
"command": "git.graph.deleteTag",
530+
"title": "%command.graphDeleteTag%",
531+
"category": "Git",
532+
"enablement": "!operationInProgress"
533+
},
522534
{
523535
"command": "git.deleteRemoteTag",
524536
"title": "%command.deleteRemoteTag%",
@@ -632,8 +644,8 @@
632644
"enablement": "!operationInProgress"
633645
},
634646
{
635-
"command": "git.cherryPickRef",
636-
"title": "%command.cherryPickRef%",
647+
"command": "git.graph.cherryPick",
648+
"title": "%command.graphCherryPick%",
637649
"category": "Git",
638650
"enablement": "!operationInProgress"
639651
},
@@ -1466,15 +1478,23 @@
14661478
"when": "false"
14671479
},
14681480
{
1469-
"command": "git.checkoutRef",
1481+
"command": "git.graph.checkout",
1482+
"when": "false"
1483+
},
1484+
{
1485+
"command": "git.graph.checkoutDetached",
1486+
"when": "false"
1487+
},
1488+
{
1489+
"command": "git.graph.deleteBranch",
14701490
"when": "false"
14711491
},
14721492
{
1473-
"command": "git.checkoutRefDetached",
1493+
"command": "git.graph.deleteTag",
14741494
"when": "false"
14751495
},
14761496
{
1477-
"command": "git.cherryPickRef",
1497+
"command": "git.graph.cherryPick",
14781498
"when": "false"
14791499
},
14801500
{
@@ -1997,24 +2017,24 @@
19972017
],
19982018
"scm/historyItem/context": [
19992019
{
2000-
"command": "git.checkoutRefDetached",
2020+
"command": "git.graph.checkoutDetached",
20012021
"when": "scmProvider == git",
20022022
"group": "1_checkout@2"
20032023
},
20042024
{
2005-
"command": "git.createTag",
2025+
"command": "git.branch",
20062026
"when": "scmProvider == git",
2007-
"group": "2_create@1"
2027+
"group": "2_branch@2"
20082028
},
20092029
{
2010-
"command": "git.branch",
2030+
"command": "git.createTag",
20112031
"when": "scmProvider == git",
2012-
"group": "2_create@2"
2032+
"group": "3_tag@1"
20132033
},
20142034
{
2015-
"command": "git.cherryPickRef",
2035+
"command": "git.graph.cherryPick",
20162036
"when": "scmProvider == git",
2017-
"group": "3_modify@1"
2037+
"group": "4_modify@1"
20182038
},
20192039
{
20202040
"command": "git.copyCommitId",
@@ -2029,9 +2049,19 @@
20292049
],
20302050
"scm/historyItemRef/context": [
20312051
{
2032-
"command": "git.checkoutRef",
2052+
"command": "git.graph.checkout",
20332053
"when": "scmProvider == git",
20342054
"group": "1_checkout@1"
2055+
},
2056+
{
2057+
"command": "git.graph.deleteBranch",
2058+
"when": "scmProvider == git && scmHistoryItemRef =~ /^refs\\/heads\\//",
2059+
"group": "2_branch@2"
2060+
},
2061+
{
2062+
"command": "git.graph.deleteTag",
2063+
"when": "scmProvider == git && scmHistoryItemRef =~ /^refs\\/tags\\//",
2064+
"group": "3_tag@2"
20352065
}
20362066
],
20372067
"editor/title": [
@@ -2045,16 +2075,6 @@
20452075
"group": "navigation",
20462076
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInNotebookTextDiffEditor && resourceScheme =~ /^git$|^file$/"
20472077
},
2048-
{
2049-
"command": "git.stage",
2050-
"group": "navigation@1",
2051-
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && git.activeResourceHasUnstagedChanges"
2052-
},
2053-
{
2054-
"command": "git.unstage",
2055-
"group": "navigation@1",
2056-
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && git.activeResourceHasStagedChanges"
2057-
},
20582078
{
20592079
"command": "git.openChange",
20602080
"group": "navigation@2",
@@ -2071,30 +2091,50 @@
20712091
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && editorLangId == git-commit"
20722092
},
20732093
{
2074-
"command": "git.stageSelectedRanges",
2094+
"command": "git.stashApplyEditor",
2095+
"alt": "git.stashPopEditor",
2096+
"group": "navigation@1",
2097+
"when": "config.git.enabled && !git.missing && resourceScheme == git-stash"
2098+
},
2099+
{
2100+
"command": "git.stashDropEditor",
2101+
"group": "navigation@2",
2102+
"when": "config.git.enabled && !git.missing && resourceScheme == git-stash"
2103+
},
2104+
{
2105+
"command": "git.stage",
2106+
"group": "2_git@1",
2107+
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && git.activeResourceHasUnstagedChanges"
2108+
},
2109+
{
2110+
"command": "git.unstage",
2111+
"group": "2_git@2",
2112+
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && git.activeResourceHasStagedChanges"
2113+
},
2114+
{
2115+
"command": "git.stage",
20752116
"group": "2_git@1",
20762117
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file"
20772118
},
20782119
{
2079-
"command": "git.unstageSelectedRanges",
2120+
"command": "git.stageSelectedRanges",
20802121
"group": "2_git@2",
2081-
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == git"
2122+
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file"
20822123
},
20832124
{
2084-
"command": "git.revertSelectedRanges",
2125+
"command": "git.unstage",
20852126
"group": "2_git@3",
2086-
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file"
2127+
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == git"
20872128
},
20882129
{
2089-
"command": "git.stashApplyEditor",
2090-
"alt": "git.stashPopEditor",
2091-
"group": "navigation@1",
2092-
"when": "config.git.enabled && !git.missing && resourceScheme == git-stash"
2130+
"command": "git.unstageSelectedRanges",
2131+
"group": "2_git@4",
2132+
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == git"
20932133
},
20942134
{
2095-
"command": "git.stashDropEditor",
2096-
"group": "navigation@2",
2097-
"when": "config.git.enabled && !git.missing && resourceScheme == git-stash"
2135+
"command": "git.revertSelectedRanges",
2136+
"group": "2_git@5",
2137+
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && isInDiffRightEditor && !isEmbeddedDiffEditor && resourceScheme == file"
20982138
}
20992139
],
21002140
"editor/context": [

extensions/git/package.nls.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,11 @@
6262
"command.undoCommit": "Undo Last Commit",
6363
"command.checkout": "Checkout to...",
6464
"command.checkoutDetached": "Checkout to (Detached)...",
65-
"command.checkoutRef": "Checkout",
66-
"command.checkoutRefDetached": "Checkout (Detached)",
6765
"command.branch": "Create Branch...",
6866
"command.branchFrom": "Create Branch From...",
6967
"command.deleteBranch": "Delete Branch...",
7068
"command.renameBranch": "Rename Branch...",
7169
"command.cherryPick": "Cherry Pick...",
72-
"command.cherryPickRef": "Cherry Pick",
7370
"command.cherryPickAbort": "Abort Cherry Pick",
7471
"command.merge": "Merge...",
7572
"command.mergeAbort": "Abort Merge",
@@ -126,6 +123,11 @@
126123
"command.viewStagedChanges": "Open Staged Changes",
127124
"command.viewUntrackedChanges": "Open Untracked Changes",
128125
"command.viewCommit": "Open Commit",
126+
"command.graphCheckout": "Checkout",
127+
"command.graphCheckoutDetached": "Checkout (Detached)",
128+
"command.graphCherryPick": "Cherry Pick",
129+
"command.graphDeleteBranch": "Delete Branch",
130+
"command.graphDeleteTag": "Delete Tag",
129131
"command.api.getRepositories": "Get Repositories",
130132
"command.api.getRepositoryState": "Get Repository State",
131133
"command.api.getRemoteSources": "Get Remote Sources",

extensions/git/src/api/api1.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import { Model } from '../model';
99
import { Repository as BaseRepository, Resource } from '../repository';
10-
import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, ForcePushMode, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState, CommitOptions, RefType, CredentialsProvider, BranchQuery, PushErrorHandler, PublishEvent, FetchOptions, RemoteSourceProvider, RemoteSourcePublisher, PostCommitCommandsProvider, RefQuery, BranchProtectionProvider, InitOptions } from './git';
10+
import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, ForcePushMode, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState, CommitOptions, RefType, CredentialsProvider, BranchQuery, PushErrorHandler, PublishEvent, FetchOptions, RemoteSourceProvider, RemoteSourcePublisher, PostCommitCommandsProvider, RefQuery, BranchProtectionProvider, InitOptions, SourceControlHistoryItemDetailsProvider } from './git';
1111
import { Event, SourceControlInputBox, Uri, SourceControl, Disposable, commands, CancellationToken } from 'vscode';
1212
import { combinedDisposable, filterEvent, mapEvent } from '../util';
1313
import { toGitUri } from '../uri';
@@ -414,6 +414,10 @@ export class ApiImpl implements API {
414414
return this.#model.registerPushErrorHandler(handler);
415415
}
416416

417+
registerSourceControlHistoryItemDetailsProvider(provider: SourceControlHistoryItemDetailsProvider): Disposable {
418+
return this.#model.registerSourceControlHistoryItemDetailsProvider(provider);
419+
}
420+
417421
registerBranchProtectionProvider(root: Uri, provider: BranchProtectionProvider): Disposable {
418422
return this.#model.registerBranchProtectionProvider(root, provider);
419423
}

0 commit comments

Comments
 (0)