diff --git a/extensions/git/package.json b/extensions/git/package.json index 7ba43eedaa6..8d098c504a3 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -1507,7 +1507,7 @@ "scope": "resource", "default": "none" }, - "git.promptToOpenClonedRepository": { + "git.openAfterClone": { "type": "string", "enum": [ "currentWindow", @@ -1516,13 +1516,13 @@ "showPrompt" ], "enumDescriptions": [ - "%config.promptToOpenClonedRepository.currentWindow%", - "%config.promptToOpenClonedRepository.newWindow%", - "%config.promptToOpenClonedRepository.noFolderOpened%", - "%config.promptToOpenClonedRepository.showPrompt%" + "%config.openAfterClone.currentWindow%", + "%config.openAfterClone.newWindow%", + "%config.openAfterClone.noFolderOpened%", + "%config.openAfterClone.showPrompt%" ], "default": "showPrompt", - "description": "%config.promptToOpenClonedRepository%" + "description": "%config.openAfterClone%" }, "git.showInlineOpenFileAction": { "type": "boolean", diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 3ef518de24e..7b0f2a57866 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -116,11 +116,11 @@ "config.postCommitCommand.none": "Don't run any command after a commit.", "config.postCommitCommand.push": "Run 'Git Push' after a successful commit.", "config.postCommitCommand.sync": "Run 'Git Sync' after a successful commit.", - "config.promptToOpenClonedRepository": "Controls whether to show a prompt after cloning a repository.", - "config.promptToOpenClonedRepository.currentWindow": "Open repository in current window.", - "config.promptToOpenClonedRepository.newWindow": "Open repository in new window.", - "config.promptToOpenClonedRepository.noFolderOpened": "Open in current window if no folder is opened. Otherwise show prompt.", - "config.promptToOpenClonedRepository.showPrompt": "Always show prompt to choose action.", + "config.openAfterClone": "Controls whether to show a prompt after cloning a repository.", + "config.openAfterClone.currentWindow": "Open repository in current window.", + "config.openAfterClone.newWindow": "Open repository in new window.", + "config.openAfterClone.noFolderOpened": "Open in current window if no folder is opened. Otherwise show prompt.", + "config.openAfterClone.showPrompt": "Always show prompt to choose action.", "config.showInlineOpenFileAction": "Controls whether to show an inline Open File action in the Git changes view.", "config.showPushSuccessNotification": "Controls whether to show a notification when a push is successful.", "config.inputValidation": "Controls when to show commit message input validation.", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index b707f75bdc2..8e5d5a06e3e 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -619,16 +619,16 @@ export class CommandCenter { ); let config = workspace.getConfiguration('git'); - let promptToOpenClonedRepository = config.get<'currentWindow' | 'newWindow' | 'noFolderOpened' | 'showPrompt'>('promptToOpenClonedRepository'); + let openAfterClone = config.get<'currentWindow' | 'newWindow' | 'noFolderOpened' | 'showPrompt'>('openAfterClone'); const uri = Uri.file(repositoryPath); - if (promptToOpenClonedRepository === 'currentWindow') { + if (openAfterClone === 'currentWindow') { commands.executeCommand('vscode.openFolder', uri); - } else if (promptToOpenClonedRepository === 'newWindow') { + } else if (openAfterClone === 'newWindow') { commands.executeCommand('vscode.openFolder', uri, true); } else { - if (promptToOpenClonedRepository === 'noFolderOpened') { + if (openAfterClone === 'noFolderOpened') { if (!workspace.workspaceFolders) { commands.executeCommand('vscode.openFolder', uri); }