Linefilter acceped for a single line inside a diffblock
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
this solves 'Line filters not working if "Match similar lines" enabled - ID: 2796768 '
This patch splitts a diff in single parts, so after that we get diffs whitch contains only matching linefilters.
Also ignore empty line from diffutils is accepted as a linefilter condition.
So before a diff with more line, containing an empty line, or a line matching a linefilter was completly marked as diff.
Now also these signle lines will be marked as trivial.
splitt a diffblock in 2 and more parts if needed.
As I wrote to Open Discussion forum thread "Problem with Linefilters":
http://apps.sourceforge.net/phpbb/winmerge/viewtopic.php?f=4&t=65&sid=531b4ef5f68f16b0c6ecb70c64eb42a6
I'm really not interested in random patches "fixing" filtering. Currently there is nothing to fix until we define how linefiltering should work. What are use cases. Which kind of GUI there should be to manage filters. So big questions must be answered first before technical details (patches).
So this patch is simply a no-go. It would only make harder to do further developments later.
I will never accept diff splitting coded inside another function. It will never work. Create class and good API with unit tests and we can continue discussion. Diff handling is very basic and very critical code in WinMerge and it must not break.
Then, how we show splitted diff in view? How user can see there is now two diffs instead of one? And yes, I'm talking about general case, not just splitting to ignored and actual diff. But we must solve this usability problem too.
So this is major GUI/architecture design problem, not technical problem.
Can't you just re-scan every time you do a merge (move lines) or split a diff ?
Boo
We could. But people have files with hundreds of thousands of lines and thousands of diffs. You don't want the extra seconds of time for every operation.
Just for some history - when I started working with WinMerge it really did rescanning all the time - and the end result was WinMerge was quite unusable for any bigger file with lots of diffs. There's been lots of effort put into trying to reduce the rescanning to minimum.