Git - only add --find-renames if the value is not the default one (#184992)

This commit is contained in:
Ladislau Szomoru
2023-06-13 09:56:29 +02:00
committed by GitHub
parent 5b2221330a
commit e82cbf80ba
+1 -1
View File
@@ -2021,7 +2021,7 @@ export class Repository {
} }
// --find-renames option is only available starting with git 2.18.0 // --find-renames option is only available starting with git 2.18.0
if (opts?.similarityThreshold && this._git.compareGitVersionTo('2.18.0') !== -1) { if (opts?.similarityThreshold && opts.similarityThreshold !== 50 && this._git.compareGitVersionTo('2.18.0') !== -1) {
args.push(`--find-renames=${opts.similarityThreshold}%`); args.push(`--find-renames=${opts.similarityThreshold}%`);
} }