GNOME Bugzilla – Bug 695912
Directory view will not ignore blank lines
Last modified: 2013-03-30 21:35:46 UTC
Created attachment 238980 [details] [review] Patch to fix the problem (needs work) There seems to be a "bug" in meld's directory view. If the Preferences->Text Filters->"Ignore changes which insert or delete blank lines" checkbox is enabled, files which differ only by blank lines show up as being different in the directory view. If you click on one of these files in the directory view, the file diff shows no differences, as expected. The attached patch demonstrates how to fix the problem, but will not work if the text filters are not enabled (I'm not bothered by this, but this behavior may be non-intuitive). Kai also mentioned that it won't work for mac or unicode line endings. It also may slow things down for large directory diffs, since it is an extra step to run on each file. Perhaps being able to enable this feature in the dirdiff "Filters" drop-down would be an idea. The usefulness of this feature may not be obvious, but I needed it when comparing two revisions of a source tree. The maintainers of this source tree update a revision number comment in every source file, so it looks like every file is different between the two trees. The requested feature, along with the "C++ comment" filter, allows us to see which files have non-comment changes, so we don't have to manually inspect every file for significant changes. The attached patch seems to work for our test case.
I've just pushed a fix for this to git HEAD (486aec). It's somewhat more invasive than the simple change, because this had to work with our comparison cache, and needed to work properly when there were no filters active. This patch works in my limited testing, so if this doesn't work in your case, do please reopen this bug. Thanks for your bug report.