Git - cleanup command names (#237790)

This commit is contained in:
Ladislau Szomoru
2025-01-13 11:47:18 +01:00
committed by GitHub
parent 69d97b0773
commit c636d93f53
3 changed files with 19 additions and 19 deletions
+8 -8
View File
@@ -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"
}
+2 -2
View File
@@ -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...",
+9 -9
View File
@@ -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;
}