From c636d93f53b5f695d91a6648b37f472669721212 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Mon, 13 Jan 2025 11:47:18 +0100 Subject: [PATCH] Git - cleanup command names (#237790) --- extensions/git/package.json | 16 ++++++++-------- extensions/git/package.nls.json | 4 ++-- extensions/git/src/commands.ts | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 4c3ea11c81f..63dcda18c76 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -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" } diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 5233f764f13..e27b66875d0 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -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...", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 46e3f116c21..584eec49422 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -2539,13 +2539,8 @@ export class CommandCenter { return this._checkout(repository, { treeish }); } - @command('git.checkoutDetached', { repository: true }) - async checkoutDetached(repository: Repository, treeish?: string): Promise { - return this._checkout(repository, { detached: true, treeish }); - } - - @command('git.checkoutRef', { repository: true }) - async checkoutRef(repository: Repository, historyItem?: SourceControlHistoryItem, historyItemRefId?: string): Promise { + @command('git.graph.checkout', { repository: true }) + async checkout2(repository: Repository, historyItem?: SourceControlHistoryItem, historyItemRefId?: string): Promise { 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 { + @command('git.checkoutDetached', { repository: true }) + async checkoutDetached(repository: Repository, treeish?: string): Promise { + return this._checkout(repository, { detached: true, treeish }); + } + + @command('git.graph.checkoutDetached', { repository: true }) + async checkoutDetached2(repository: Repository, historyItem?: SourceControlHistoryItem): Promise { if (!historyItem) { return false; }