mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
@@ -291,6 +291,8 @@ function getGitErrorCode(stderr: string): string | undefined {
|
||||
return GitErrorCodes.RepositoryNotFound;
|
||||
} else if (/unable to access/.test(stderr)) {
|
||||
return GitErrorCodes.CantAccessRemote;
|
||||
} else if (/Couldn\'t find remote ref/.test(stderr)) {
|
||||
return GitErrorCodes.CantAccessRemote;
|
||||
}
|
||||
|
||||
return void 0;
|
||||
@@ -730,13 +732,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