Merge branch 'master' of https://github.com/matthewshirley/vscode into matthewshirley-master

This commit is contained in:
Joao Moreno
2017-06-26 15:36:00 +02:00
5 changed files with 53 additions and 2 deletions

View File

@@ -290,6 +290,8 @@ function getGitErrorCode(stderr: string): string | undefined {
return GitErrorCodes.CantAccessRemote;
} else if (/branch '.+' is not fully merged/.test(stderr)) {
return GitErrorCodes.BranchNotFullyMerged;
} else if (/Couldn\'t find remote ref/.test(stderr)) {
return GitErrorCodes.CantAccessRemote;
}
return void 0;
@@ -748,13 +750,18 @@ export class Repository {
}
}
async pull(rebase?: boolean): Promise<void> {
async pull(rebase?: boolean, remote?: string, branch?: string): Promise<void> {
const args = ['pull'];
if (rebase) {
args.push('-r');
}
if (remote && branch) {
args.push(remote);
args.push(branch);
}
try {
await this.run(args);
} catch (err) {