mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
Merge commit 'refs/pull/69763/head' of github.com:Microsoft/vscode into pr/69763
This commit is contained in:
commit
fee4ee0df8
|
@ -488,13 +488,15 @@ export class CommandCenter {
|
|||
);
|
||||
|
||||
const choices = [];
|
||||
let message = localize('proposeopen', "Would you like to open the cloned repository?");
|
||||
const open = localize('openrepo', "Open Repository");
|
||||
let message = localize('proposeopen', "Where would you to open the cloned repository?");
|
||||
const open = localize('openrepo', "Current Window");
|
||||
const openNewWindow = localize('openreponew', "New Window");
|
||||
choices.push(open);
|
||||
choices.push(openNewWindow);
|
||||
|
||||
const addToWorkspace = localize('add', "Add to Workspace");
|
||||
if (workspace.workspaceFolders) {
|
||||
message = localize('proposeopen2', "Would you like to open the cloned repository, or add it to the current workspace?");
|
||||
message = localize('proposeopen2', "Where would you like to open the cloned repository, or add it to the current workspace?");
|
||||
choices.push(addToWorkspace);
|
||||
}
|
||||
|
||||
|
@ -515,6 +517,8 @@ export class CommandCenter {
|
|||
commands.executeCommand('vscode.openFolder', uri);
|
||||
} else if (result === addToWorkspace) {
|
||||
workspace.updateWorkspaceFolders(workspace.workspaceFolders!.length, 0, { uri });
|
||||
} else if (result === openNewWindow) {
|
||||
commands.executeCommand('vscode.openFolder', uri, true);
|
||||
}
|
||||
} catch (err) {
|
||||
if (/already exists and is not an empty directory/.test(err && err.stderr || '')) {
|
||||
|
@ -600,9 +604,11 @@ export class CommandCenter {
|
|||
await this.git.init(repositoryPath);
|
||||
|
||||
const choices = [];
|
||||
let message = localize('proposeopen init', "Would you like to open the initialized repository?");
|
||||
const open = localize('openrepo', "Open Repository");
|
||||
let message = localize('proposeopen init', "Where would you like to open the initialized repository?");
|
||||
const open = localize('openrepo', "Current Window");
|
||||
const openNewWindow = localize('openreponew', "New Window");
|
||||
choices.push(open);
|
||||
choices.push(openNewWindow);
|
||||
|
||||
if (!askToOpen) {
|
||||
return;
|
||||
|
@ -610,7 +616,7 @@ export class CommandCenter {
|
|||
|
||||
const addToWorkspace = localize('add', "Add to Workspace");
|
||||
if (workspace.workspaceFolders) {
|
||||
message = localize('proposeopen2 init', "Would you like to open the initialized repository, or add it to the current workspace?");
|
||||
message = localize('proposeopen2 init', "Where would you like to open the initialized repository, or add it to the current workspace?");
|
||||
choices.push(addToWorkspace);
|
||||
}
|
||||
|
||||
|
@ -621,6 +627,8 @@ export class CommandCenter {
|
|||
commands.executeCommand('vscode.openFolder', uri);
|
||||
} else if (result === addToWorkspace) {
|
||||
workspace.updateWorkspaceFolders(workspace.workspaceFolders!.length, 0, { uri });
|
||||
} else if (result === openNewWindow) {
|
||||
commands.executeCommand('vscode.openFolder', uri, true);
|
||||
} else {
|
||||
await this.model.openRepository(repositoryPath);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue