mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Checkout specific branch during clone operation (#163705)
This commit is contained in:
@@ -361,6 +361,7 @@ export interface ICloneOptions {
|
||||
readonly parentPath: string;
|
||||
readonly progress: Progress<{ increment: number }>;
|
||||
readonly recursive?: boolean;
|
||||
readonly ref?: string;
|
||||
}
|
||||
|
||||
export class Git {
|
||||
@@ -455,6 +456,9 @@ export class Git {
|
||||
if (options.recursive) {
|
||||
command.push('--recursive');
|
||||
}
|
||||
if (options.ref) {
|
||||
command.push('--branch', `'${options.ref}'`);
|
||||
}
|
||||
await this.exec(options.parentPath, command, {
|
||||
cancellationToken,
|
||||
env: { 'GIT_HTTP_USER_AGENT': this.userAgent },
|
||||
|
||||
Reference in New Issue
Block a user