mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Merge commit 'refs/pull/58380/head' of github.com:Microsoft/vscode into pr/58380
This commit is contained in:
16
extensions/git/src/commands.ts
Normal file → Executable file
16
extensions/git/src/commands.ts
Normal file → Executable file
@@ -512,6 +512,22 @@ export class CommandCenter {
|
||||
|
||||
await this.git.init(path);
|
||||
await this.model.openRepository(path);
|
||||
|
||||
const choices = [];
|
||||
let message = localize('proposeopeninitialisedrepo', "Would you like to add the repository folder to workspace?");
|
||||
const open = localize('addinitrepo', "Add folder");
|
||||
const notopen = localize('notaddinitrepo', "No, don't add");
|
||||
choices.push(open);
|
||||
choices.push(notopen);
|
||||
|
||||
const result = await window.showInformationMessage(message, ...choices);
|
||||
const openFolder = result === open;
|
||||
|
||||
if(openFolder)
|
||||
{
|
||||
const uri = Uri.file(path);
|
||||
workspace.updateWorkspaceFolders(workspace.workspaceFolders ? workspace.workspaceFolders.length : 0, null, { uri});
|
||||
}
|
||||
}
|
||||
|
||||
@command('git.openRepository', { repository: false })
|
||||
|
||||
Reference in New Issue
Block a user