winmerge icon indicating copy to clipboard operation
winmerge copied to clipboard

Filter feature

Open Wallby opened this issue 1 month ago • 3 comments

Hello,

I would like to see a filter feature in WinMerge. I use WinMerge a lot, for files and folders both.

This feature would be useful for when sending Android adb logcat outputs on forums. For example, I recently had an issue which required running adb logcat -c; adb logcat *:E > logcat.txt and then performing some action. I did this twice, once doing the action that caused the error, and once doing something else. This way I created a logcat_noise.txt the second time.

WinMerge could make this even more cool by allowing a filter mode, which instead of doing a merge uses the left file as a "detect any occurrences of each line". That way it could highlight the noise in the other file and make it easily visible what is and isn't noise, and allow for some manual tweaking if perhaps some stuff is wished to be kept.

For example here the left file is the filter file and in the right file the > indicates lines that match the filter (that would be highlighted in color in WinMerge).

Left file:

Error: Very very bad thing happened
Warning: About to become worse

Right file:

> Warning: About to become worse
> Warning: About to become worse
> Warning: About to become worse
Error: Can't keep up with flickering
> Error: Very very bad thing happened
> Error: Very very bad thing happened
> Warning: About to become worse
> Warning: About to become worse
> Warning: About to become worse
> Warning: About to become worse
Warning: Screen is flickering
Error: Can't keep up with flickering

I don't know if this is something that is already possible, or makes sense within the scope of the WinMerge project. WinMerge is a nice tool as is, and I'd like to see this in the WinMerge GUI.

Wallby avatar Nov 29 '25 23:11 Wallby

I guess it's like an unordered merge? Because a merge always tracks lines sequentially. Whereas this doesn't.

Wallby avatar Nov 29 '25 23:11 Wallby

I may not fully understand the feature request, but WinMerge already provides plugins that might help with this use case. There are plugins to sort lines and count duplicate lines.

You can try: Plugins → Edit with Unpacker... and set the plugin pipeline to:

SortAscending|CountDuplicates

This will sort the lines and count duplicates, which can be useful when comparing log files.

Image

sdottaka avatar Nov 30 '25 21:11 sdottaka

I don't want to sort given that the order matters here. But does the duplicate plugin work by checking anything in the right file that is a duplicate of something in the right file? Perhaps my request is basically using a list of (regex) patterns. More than one. Line separated.

Wallby avatar Dec 02 '25 17:12 Wallby