4 ms·
Sure, diff3 is better than nothing. zdiff3 is even better. But there's so much scope for better diffs still. For starters we could have semantically aware diffs
by IshKebab 5y ago
Sure, diff3 is better than nothing. zdiff3 is even better. But there's so much scope for better diffs still. For starters we could have semantically aware diffs that take into account where blocks are (I think there are some efforts to do this).
But even diff3 is missing information. Lets say the code started as A, you changed it to B. Then you rebase and `master` is C. You'll get basically "It's C now! But you changed it from A to B."
That's not enough information. Why was it changed to C? I don't know how to update my diff without that information. Really you need to see the change that changed it to C too.
There's so much scope for an advanced conflict resolution tool. Git gets it wrong in so many situations where you could do better.
- exclipy 5y agoIf you know A and B, and you know C, then you know the diff from A to C.
- IshKebab 5y agoSure but that often isn't enough because it doesn't tell you which commit actually made the change.
- golergka 5y agodifftastic (https://difftastic.wilfred.me.uk https://difftastic.wilfred.me.uk) is an awesome tool to display diffs in syntax-aware way.
- IshKebab 5y agoOooo looks nice. I'm going to try it.
- difflens 5y agoDifflens (https://github.com/marketplace/difflens https://github.com/marketplace/difflens) is a step in this direction. It produces syntax aware diffs for TS/JS and CSS at the moment.