I'd sure like to be able to see how two files are different, but not have differences in whitespace appear to be changes. Often I use KDIFF3 not to determine how to merge two files, but just to see what changed. E.g., I might compare trace output of two program executions, and I don't care about changes to the formatting of the traces.
You can disable the highlighting of white space changes via the menu "Diff view"->"Show white space". If this is not enough you might want to check the diff-options where you can select to "ignore numbers" etc. More sophisticated suppression of differences is possible by using a preprocessor. Please see the KDiff3-documentation for that.
In Settings, Configure KDiff3, Diff tab, set Preprocessor command to the
following to ignore all whitespace:
perl -p -e "s/+/ /g"
Thanks for the suggestions (Joachim: "show white space"; and ibarrac: perl
...). And Joachim, thanks for an excellent program.
However this issue is still very much a problem for me, and I suspect for many
other users. Both solutions above do not help when doing a directory diff. For
example when I do a directory diff of a website with say, 250 files, I get the
red merge-manual indicator for about 175 files, virtually all of which have
only line-ending differences. I have to click on each one of them to be able
to tell if the issue was purely white-space or a more serious diff.
A previous version of Kdiff3 (0.9.92) had an option on the Diff page,
"Preserve Carriage Return" which looks like it might have accomplished this,
however this option is no longer there in the current version (0.9.96).
In summary it would be REALLY useful to be able to do directory diffs with an
'ignore line-endings' or something like that to get a broad-brush view of
differences between two directories.
I have to strongly agree with the previous post. I love KDIFF, but won't be able to use it effectively unless this issue is addressed of there is a workaround. Every single file in my project is showing up as a diff because of an empty line or two. I cannot zero in on the real diffs ....
There exists an option in the directory settings "Full analysis" (instead of binary comparison). It will take longer, but will give you information of whitespace differences too. It will also use the preprocessors if specified.
And in the latest git-version there is again some support for "Preserve carriage return". You might want to try that.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.