mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Git - cleanup command names (#237790)
This commit is contained in:
@@ -454,14 +454,14 @@
|
||||
"enablement": "!operationInProgress"
|
||||
},
|
||||
{
|
||||
"command": "git.checkoutRef",
|
||||
"title": "%command.checkoutRef%",
|
||||
"command": "git.graph.checkout",
|
||||
"title": "%command.graphCheckout%",
|
||||
"category": "Git",
|
||||
"enablement": "!operationInProgress"
|
||||
},
|
||||
{
|
||||
"command": "git.checkoutRefDetached",
|
||||
"title": "%command.checkoutRefDetached%",
|
||||
"command": "git.graph.checkoutDetached",
|
||||
"title": "%command.graphCheckoutDetached%",
|
||||
"category": "Git",
|
||||
"enablement": "!operationInProgress"
|
||||
},
|
||||
@@ -1466,11 +1466,11 @@
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "git.checkoutRef",
|
||||
"command": "git.graph.checkout",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "git.checkoutRefDetached",
|
||||
"command": "git.graph.checkoutDetached",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
@@ -1997,7 +1997,7 @@
|
||||
],
|
||||
"scm/historyItem/context": [
|
||||
{
|
||||
"command": "git.checkoutRefDetached",
|
||||
"command": "git.graph.checkoutDetached",
|
||||
"when": "scmProvider == git",
|
||||
"group": "1_checkout@2"
|
||||
},
|
||||
@@ -2029,7 +2029,7 @@
|
||||
],
|
||||
"scm/historyItemRef/context": [
|
||||
{
|
||||
"command": "git.checkoutRef",
|
||||
"command": "git.graph.checkout",
|
||||
"when": "scmProvider == git",
|
||||
"group": "1_checkout@1"
|
||||
}
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
"command.undoCommit": "Undo Last Commit",
|
||||
"command.checkout": "Checkout to...",
|
||||
"command.checkoutDetached": "Checkout to (Detached)...",
|
||||
"command.checkoutRef": "Checkout",
|
||||
"command.checkoutRefDetached": "Checkout (Detached)",
|
||||
"command.graphCheckout": "Checkout",
|
||||
"command.graphCheckoutDetached": "Checkout (Detached)",
|
||||
"command.branch": "Create Branch...",
|
||||
"command.branchFrom": "Create Branch From...",
|
||||
"command.deleteBranch": "Delete Branch...",
|
||||
|
||||
@@ -2539,13 +2539,8 @@ export class CommandCenter {
|
||||
return this._checkout(repository, { treeish });
|
||||
}
|
||||
|
||||
@command('git.checkoutDetached', { repository: true })
|
||||
async checkoutDetached(repository: Repository, treeish?: string): Promise<boolean> {
|
||||
return this._checkout(repository, { detached: true, treeish });
|
||||
}
|
||||
|
||||
@command('git.checkoutRef', { repository: true })
|
||||
async checkoutRef(repository: Repository, historyItem?: SourceControlHistoryItem, historyItemRefId?: string): Promise<void> {
|
||||
@command('git.graph.checkout', { repository: true })
|
||||
async checkout2(repository: Repository, historyItem?: SourceControlHistoryItem, historyItemRefId?: string): Promise<void> {
|
||||
const historyItemRef = historyItem?.references?.find(r => r.id === historyItemRefId);
|
||||
if (!historyItemRef) {
|
||||
return;
|
||||
@@ -2569,8 +2564,13 @@ export class CommandCenter {
|
||||
}
|
||||
}
|
||||
|
||||
@command('git.checkoutRefDetached', { repository: true })
|
||||
async checkoutRefDetached(repository: Repository, historyItem?: SourceControlHistoryItem): Promise<boolean> {
|
||||
@command('git.checkoutDetached', { repository: true })
|
||||
async checkoutDetached(repository: Repository, treeish?: string): Promise<boolean> {
|
||||
return this._checkout(repository, { detached: true, treeish });
|
||||
}
|
||||
|
||||
@command('git.graph.checkoutDetached', { repository: true })
|
||||
async checkoutDetached2(repository: Repository, historyItem?: SourceControlHistoryItem): Promise<boolean> {
|
||||
if (!historyItem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user