mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Return whether git.checkout succeeded
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user