提交 f50b8744 编写于 作者: R Rachel Macfarlane

Return whether git.checkout succeeded

上级 b4f4f55f
......@@ -1347,9 +1347,9 @@ export class CommandCenter {
}
@command('git.checkout', { repository: true })
async checkout(repository: Repository, treeish: string): Promise<void> {
async checkout(repository: Repository, treeish: string): Promise<boolean> {
if (typeof treeish === 'string') {
return await repository.checkout(treeish);
return await repository.checkout(treeish).then(_ => true);
}
const config = workspace.getConfiguration('git');
......@@ -1373,10 +1373,10 @@ export class CommandCenter {
const choice = await window.showQuickPick(picks, { placeHolder });
if (!choice) {
throw new Error('Cancelled');
return false;
}
await choice.run(repository);
return choice.run(repository).then(_ => true);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册