mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 22:41:31 +01:00
Git - only add default branch name if supported (#185557)
This commit is contained in:
@@ -404,7 +404,7 @@ export class Git {
|
||||
async init(repository: string, options: InitOptions = {}): Promise<void> {
|
||||
const args = ['init'];
|
||||
|
||||
if (options.defaultBranch && options.defaultBranch !== '') {
|
||||
if (options.defaultBranch && options.defaultBranch !== '' && this.compareGitVersionTo('2.28.0') !== -1) {
|
||||
args.push('-b', options.defaultBranch);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user