3

I have two versions of a text file, with many changes (including whitespace, linebreak differences, etc.). All of the diff tools I have tried (diff, diff --minimal, wdiff, kdiff3, meld) fail spectacularly to even come close to properly aligning the two versions (it seems that they start lining things up from the beginning of the file, and once they are "out of sync", they never get back on track). Actually, the best diff tool I've found for this pair of files is the diff displayed inside gitk, but I don't know how to call it externally (and it is anyway only passable).

Is there any diff tool which will find a minimal set of changes between two files? (e.g. by using dynamic programming)

I am most interested in tools available on linux.

1
  • Be aware that the difftool and algorithm chosen are orthogonal, though some tools may have algorithms not natively present in git. Have you tried git diff --diff-algorithm=histogram?
    – MooseBoys
    Commented Sep 23, 2019 at 16:44

2 Answers 2

0

Notepad++ has a comparison tool that works quite well for me. It seems to do a really good job of identifying the matches and calling out the true differences. Notepad++ is free to download and a very useful software for a myriad of other reasons as well.

https://notepad-plus-plus.org/

1
  • Please add the plugin name, its website, if its open source then also add the repository name and link. No need to reply this comment.
    – Biswapriyo
    Commented Sep 3, 2019 at 16:35
0

If we speak about Windows GUI differs, I have to say:

  • Most of modern diff-tools (which I saw and tried) have in settings (configurable) ignore "EOL|Whitespace changes"
  • Most of modern diff-tools can show inline changes (for not-ignored content)

P4Merge can detect (and show in interface in clean form) inserted|deleted chunks, do not converting into mess the rest part of file

CompareIt! have even more wide set of ignorable changes and concept of different "comparison profiles", regexps processing (didn't try yet, can't comment), "moved blocks" detection (and it works)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .