mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Merge branch 'master' of https://github.com/matthewshirley/vscode into matthewshirley-master
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user