3 ms·
Instead of ranting about how much I am annoyed by this problem, let me just ask: Are there any good diff tools/algorithms that don't consistently freak out when
by MauranKilom 5y ago
Instead of ranting about how much I am annoyed by this problem, let me just ask: Are there any good diff tools/algorithms that don't consistently freak out when you change the indentation of a block of code? Yes, diff tools like to go by unique/common lines, and yes, those two } are technically the only common line in this chunk, but that is beyond useless when all you did was wrap something in an if/else.
(And yes, P4V tools have "ignore all white space" - which is a great way to produce a completely useless merge result, in my experience. If you can tune out of nonsensical indentation in one side of the comparison, it's at least passable for diffing.)
- ansible 5y agoThere are starting to be more code-aware diff tools. https://github.com/Wilfred/difftastic https://github.com/Wilfred/difftastic I'm currently trying this out, but I'm not sure if I'll keep using it.
- jshowalter 5y agoRational only stored the diffs between two decorated abstract syntax trees. So you got as-you-like it pretty printing, no conflicts on formatting, just everything you ever dreamed of. In 1987.