diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-09-05 15:08:55 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-09-23 14:31:22 +0000 |
commit | a51db43b580f774c64275cd3e1e0c707de2a04a4 (patch) | |
tree | 8e009b6b4d3ecf7cb3eea2aa8e90b77a35d6dde3 | |
parent | 3b937032f51c75b3f517e02b1db670884a8dc103 (diff) |
Switch from patience diff to minimal diff
I find that a pure indentation change (making all the doc comments in
qcalendar.cpp use the same indent, without reflowing after) gets
complained at for mixing space-changes with non-space-changes. This
arises because the "patience diff" algorithm we've been using makes
some less than ideal choices. The minimal diff algorithm fares better
on such a change - and sounds like it has a decent chance of being
good on whatever cases prompted (the bogus and unnatural diffs that
lead to) commit 6dac9c54dc0b72643629da2442bbe7c4526d7ae4, which this
amends.
Change-Id: I3b7efc03dbd8ec388ebc38458b25552f4ec426d6
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rwxr-xr-x | git-hooks/sanitize-commit | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index d548034..08a3dab 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -667,7 +667,9 @@ my $tsv_check; my $eof_check; my $ctlkw_check; my $apple_check; -open DIFF, "git diff-tree --patience --no-commit-id --diff-filter=ACMR --ignore-submodules --src-prefix=\@old\@/ --dst-prefix=\@new\@/ --full-index -r -U100000 --cc -C -l1000 --root ".$sha1." |" or die "cannot run git: $!"; +open DIFF, "git diff-tree --minimal --no-commit-id --diff-filter=ACMR --ignore-submodules " . + "--src-prefix=\@old\@/ --dst-prefix=\@new\@/ --full-index -r -U100000 --cc -C -l1000 " . + "--root ".$sha1." |" or die "cannot run git: $!"; while (<DIFF>) { if (/^-/) { if ($mixws_check) { |