1
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.
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 – 2019-09-23T16:44:07.400