Git - only add --ignore-case if it is a supported flag (#209819)

This commit is contained in:
Ladislau Szomoru 2024-04-08 12:47:18 +02:00 committed by GitHub
parent 0662190b2c
commit 45b5423f72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2525,7 +2525,7 @@ export class Repository {
// On Windows and macOS ref names are case insensitive so we add --ignore-case
// to handle the scenario where the user switched to a branch with incorrect
// casing
if (isWindows || isMacintosh) {
if (this.git.compareGitVersionTo('2.12') !== -1 && (isWindows || isMacintosh)) {
args.push('--ignore-case');
}