mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Git - add actions to merge/rebase to repositories view (#274480)
This commit is contained in:
@@ -1059,6 +1059,18 @@
|
||||
"icon": "$(plus)",
|
||||
"category": "Git",
|
||||
"enablement": "!operationInProgress"
|
||||
},
|
||||
{
|
||||
"command": "git.repositories.merge",
|
||||
"title": "%command.merge2%",
|
||||
"category": "Git",
|
||||
"enablement": "!operationInProgress"
|
||||
},
|
||||
{
|
||||
"command": "git.repositories.rebase",
|
||||
"title": "%command.rebase2%",
|
||||
"category": "Git",
|
||||
"enablement": "!operationInProgress"
|
||||
}
|
||||
],
|
||||
"continueEditSession": [
|
||||
@@ -1702,6 +1714,14 @@
|
||||
{
|
||||
"command": "git.repositories.createTag",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "git.repositories.merge",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "git.repositories.rebase",
|
||||
"when": "false"
|
||||
}
|
||||
],
|
||||
"scm/title": [
|
||||
@@ -1920,9 +1940,19 @@
|
||||
"group": "1_checkout@2",
|
||||
"when": "scmProvider == git"
|
||||
},
|
||||
{
|
||||
"command": "git.repositories.merge",
|
||||
"group": "2_modify@1",
|
||||
"when": "scmProvider == git && scmArtifactGroupId == branches"
|
||||
},
|
||||
{
|
||||
"command": "git.repositories.rebase",
|
||||
"group": "2_modify@2",
|
||||
"when": "scmProvider == git && scmArtifactGroupId == branches"
|
||||
},
|
||||
{
|
||||
"command": "git.repositories.compareRef",
|
||||
"group": "2_compare@1",
|
||||
"group": "3_compare@1",
|
||||
"when": "scmProvider == git"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -74,8 +74,10 @@
|
||||
"command.cherryPick": "Cherry Pick...",
|
||||
"command.cherryPickAbort": "Abort Cherry Pick",
|
||||
"command.merge": "Merge...",
|
||||
"command.merge2": "Merge",
|
||||
"command.mergeAbort": "Abort Merge",
|
||||
"command.rebase": "Rebase Branch...",
|
||||
"command.rebase2": "Rebase Branch",
|
||||
"command.createTag": "Create Tag...",
|
||||
"command.deleteTag": "Delete Tag...",
|
||||
"command.migrateWorktreeChanges": "Migrate Worktree Changes...",
|
||||
|
||||
@@ -5278,6 +5278,24 @@ export class CommandCenter {
|
||||
await this._checkout(repository, { treeish: artifact.name, detached: true });
|
||||
}
|
||||
|
||||
@command('git.repositories.merge', { repository: true })
|
||||
async artifactMerge(repository: Repository, artifact: SourceControlArtifact): Promise<void> {
|
||||
if (!repository || !artifact) {
|
||||
return;
|
||||
}
|
||||
|
||||
await repository.merge(artifact.id);
|
||||
}
|
||||
|
||||
@command('git.repositories.rebase', { repository: true })
|
||||
async artifactRebase(repository: Repository, artifact: SourceControlArtifact): Promise<void> {
|
||||
if (!repository || !artifact) {
|
||||
return;
|
||||
}
|
||||
|
||||
await repository.rebase(artifact.id);
|
||||
}
|
||||
|
||||
@command('git.repositories.compareRef', { repository: true })
|
||||
async artifactCompareWith(repository: Repository, artifact: SourceControlArtifact): Promise<void> {
|
||||
if (!repository || !artifact) {
|
||||
|
||||
Reference in New Issue
Block a user