提交 c555552d 编写于 作者: J Joao Moreno

Merge commit 'refs/pull/58380/head' of github.com:Microsoft/vscode into pr/58380

......@@ -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 })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册