← Back to context

Comment by iwwr

4 years ago

Is this tool obsoleted by autoformatters?

It could be useful if it was modified to become a great merge tool. I've been using kdiff3 as my git mergetool and its always splits my code up at the worst spots because it does not understand python.

Not unless you you have a git hook to ensure that every commit is run through the auto formatter, and you additionally ensure that everyone that commits to the repositories you work on have this hook installed too. And even then, many people still interact with repositories that are outside of their power to enforce such rules upon.

  • >git hook to ensure that every commit is run through the auto formatter, and you additionally ensure that everyone that commits to the repositories you work on have this hook installed too

    Eg. with node project this is a trivial task with tools like Husky in place

  • Not necessarily. You could also run the "unformatted" files through the formatter before doing the diff.

  • sorry for the dumb question but why can't you use GH Actions for this? (Instead of making sure all committers have the hook installed.)

no, because the bigger win isn't ingoring whitespacing. It's ignore refactoring changes like renaming functions

This tool works with the author’s intended layout, a big advantage over autoformatters which destroy and replace it poorly (it’s probably an AI-complete problem).