winmerge
winmerge copied to clipboard
WinMerge incorrectly states "The selected files are identical"
Hi all,
WinMerge has unfortunately wasted my time by having me go back and recover deleted files that I thought were safe to delete.
This happened repeatedly: I thought the two files were the same because WinMerge told me "The selected files are identical". And so I deleted one of the supposedly duplicate files.
The files were not duplicates, though. For HTML files, there were important differences in the comments. For some reason differences in comments still show up as the "same".
Firstly, in my opinion WinMerge should show a different message clarifying that the files aren't actually the same. "The selected files are effectively identical due to current comparison settings." vs "The selected files are identical". (For extra credit, a button to press which shows modules/settings have resulted in the files being considered identical).
Secondly, I wouldn't have expected this to occur given my settings. The "plugins enabled" is unchecked. I didn't see anything in settings that would explain what's happening.
Thirdly, this is open to discussion, but unless this is a bug, in my opinion this is odd behavior to happen by default. I can repro on a vanilla exe of 2.16.42.1.exe, drag/drop the attached files into WinMerge and a message pops up saying they are "the same".
Update: I had assumed that this was a malfunctioning plugin treating html files with changed comments as the same. But this seems to happen for any html file.
I can't remember if winmerge stores its settings in localappdata but I'm happy to send over more files in case there's somehow a corrupted state on my machine. Because I'm using the pure .zip from the website I'd assumed the settings were stored alongside the exe.
WinMerge's "Ignore comment differences" option will ignore the differences in comments. Is this option enabled?
I tried comparing the files you attached with the latest version of WinMerge, but the message box "The selected files are identical" did not appear.
WinMerge settings are saved in the registry at HKEY_CURRENT_USER\Software\Thingamahoochie\WinMerge.
After closing WinMerge, could you rename the above "WinMerge" to something else in the registry editor (regedit.exe) and compare the files again with WinMerge?
If the problem does not reoccur, it is likely that some setting is involved, so it would be helpful if you could export the renamed registry data and attach it.
(If the exported text file contains any history data that you do not want others to see, please delete that part.)
Thank you for the quick reply,
Yes, renaming in the registry does solve the issue.
Before (incorrect):
After (correct):
I didn't use any advanced features of WinMerge like plugins, so I'm still not sure how the machine got into this state. I haven't run any registry-modifying tools/done anything odd with the registry, and it's a new Windows install from a few months ago. Until recently I used to run winmerge from scoop, until I started using the official x64 binaries from the homepage. The problem occurred on both of them.
I was able to reproduce this issue by importing the configuration data you attached.
When I checked the settings, I found that the file name pattern for image files was empty, as shown below, which caused all files to be treated as image files and text files to not be properly loaded as images, resulting in no differences.
I don't know why the above is empty, but it is not our intention that all files will be compared as images when it is empty, so we will fix this in a future version.
We also hope to fix the behavior when text files are compared as images in a future version.
Thank you so much for looking into this!
Yes, this sounds good.
It actually could be my fault that the file name pattern for image files was empty, I remember trying to turn off image comparison and might have left the setting like that.
confronted with the same issue.
And this happens regularly... plain ascii
Settings:
This is causing me so much wasted time because I can't trust what it says anymore...
Contrary to this, even with ignoring carriage return differences, it'll also claim files are different if one side uses Windows (CR/LF) and the other side Unix (LF)
@FaceCrap What Compare method is selected? You can check the Compare method in the Compare/Folder category of the Options window. If you selected [Size], it will say Identical if the file sizes match. If so, select Full Contents and try comparing again.