After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695912 - Directory view will not ignore blank lines
Directory view will not ignore blank lines
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: dirdiff
git master
Other Linux
: Normal normal
: ---
Assigned To: meld-maint
meld-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-15 14:08 UTC by Jeff Webb
Modified: 2013-03-30 21:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the problem (needs work) (610 bytes, patch)
2013-03-15 14:08 UTC, Jeff Webb
none Details | Review

Description Jeff Webb 2013-03-15 14:08:08 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.
Comment 1 Kai Willadsen 2013-03-30 21:35:46 UTC
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.