Git - only add --diff-merges if flag is supported (#200954)

This commit is contained in:
Ladislau Szomoru 2023-12-15 14:39:46 +01:00 committed by GitHub
parent 1b27c60b38
commit 81546fb355
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1049,7 +1049,11 @@ export class Repository {
const args = ['log', `--format=${COMMIT_FORMAT}`, '-z'];
if (options?.shortStats) {
args.push('--shortstat', '--diff-merges=first-parent');
args.push('--shortstat');
if (this._git.compareGitVersionTo('2.31') !== -1) {
args.push('--diff-merges=first-parent');
}
}
if (options?.reverse) {