Mac: Different line endings cause files to appear different

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
kody
Posts: 2
Joined: Sun Feb 10, 2008 1:04 am

Mac: Different line endings cause files to appear different

Post by kody » Sun Feb 10, 2008 1:10 am

I just downloaded the OS X version of diffmerge. When comparing files the only difference being the line endings, the files show up as different. When you look at the differences, a dialog pops up saying the files are equal under the current ruleset.

The files are PHP and being viewed under the default ruleset which is set to ignore line endings. I also tried creating a PHP specific ruleset which predictably didn't have an effect (since it was just a copy of the ruleset).

I don't know if it's by design, but I would think these files should not show up as different in the main window. I'm looking at 1240 files that are different so it's not practical for me to open each one to see if it really is. (Most of them aren't.)

Thanks.

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

The folder diff window doesn't use the ruleset.

Post by jeffhostetler » Mon Feb 11, 2008 10:38 am

The folder diff window does an exact match on the individual
pairs of files. The rulesets are only used within the file diff/merge
windows. This was done for performance reasons - running the
full diff algorithm on (possibly) thousands of files in a source tree
could take a while. We thought it better in the general case to
just do a quick exact-match compare and save the expensive stuff
for the individual file windows.

Unfortunately, this doesn't help in the case you've described.
We already have a bug/feature request for this, so hopefully we
can get it into a future release.

in the mean time, perhaps you can make a copy of the source
trees and run a 'dos2unix' like utility on them (to normalize all of
the line endings) and then compare them.

sorry, i can't be more helpful at this time.
jeff

kody
Posts: 2
Joined: Sun Feb 10, 2008 1:04 am

Re: The folder diff window doesn't use the ruleset.

Post by kody » Mon Feb 11, 2008 5:06 pm

Thanks for the reply and the explanation and the suggestion.

Maybe you should consider having the option to ignore line endings and other performant and obvious alteratons to happen before creating the file list.

Thanks again.

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Mac: Different line endings cause files to appear different

Post by jeffhostetler » Thu Apr 09, 2009 10:27 am

SourceGear DiffMerge 3.3.0 is now available and fixes this problem.

The folder diff window was updated to allow it to optionally use some of
the Ruleset settings to treat minor differences as equivalent.

Full details can be found at http://www.sourcegear.com/diffmerge/index.html.

jeff hostetler

Post Reply