git: fetch from all remotes

fixes #56463
This commit is contained in:
Joao Moreno
2018-09-12 16:20:48 +02:00
parent f9d5b65614
commit d880689924
5 changed files with 34 additions and 7 deletions

View File

@@ -1397,6 +1397,16 @@ export class CommandCenter {
await repository.fetchDefault();
}
@command('git.fetchAll', { repository: true })
async fetchAll(repository: Repository): Promise<void> {
if (repository.remotes.length === 0) {
window.showWarningMessage(localize('no remotes to fetch', "This repository has no remotes configured to fetch from."));
return;
}
await repository.fetchAll();
}
@command('git.pullFrom', { repository: true })
async pullFrom(repository: Repository): Promise<void> {
const remotes = repository.remotes;