Skip Navigation

Anyone have any favorite diffing tools?

Does anyone have a favorite diff tool for reviewing lots of code? I'm thinking something along the lines like meld or vimdiff. I don't really need a git client. I'm comfortable with the git CLI. I'm mainly interested in making code reviews a little easier to manage.

I'm reviewing a large code change right now and the web interface sucks. It's slow. It doesn't load all the files at once. Cross referencing files sucks.

I know, I know. "Code changes should be small." I've already voiced that to my team, yet here we are. I'm trying to figure out a way to make this a little less miserable.

30 comments
  • I use emacs's magit for git stuff (the bulk of things) and emacs's ediff for most other things.

    Good if you know emacs, but hard to recommend using it for someone who doesn't.

    EDIT: Oh, one exotic utility that's useful for some rare cases, not really for interactive merging of code --- wdiff for word-level diffing. Most code can reasonably be diffed on a line-by-line basis, but that's not true for some text formats, which can have very long lines. Human, natural language in text format, is one good example.

  • I just have a script that has a few commands with presets to see the differences I care about:

    Short diff: git diff -w --ignore-blank-lines --color-words='\w+|.'
    Slightly longer diff: git diff -w --ignore-blank-lines

  • The tortoise diff tool when doing most stuff.

    Winmerge if I am manually comparing directories (it can do images/pdfs too!)

  • yeah, I was also after a CLI tool for that because my goto is a 3-way merge in a GUI editor at this moment. I just didn't find any CLI tool that beats that in usability and visuals (syntax+diff highlighting)

    For simple diffs, my favorites are difftastic and Delta.

  • I use GitLab diffs in single-file-view mode, TortoiseGit Merge when it exceeds what GitLab can reasonably display (including block indent changes I can ignore in TortoiseGit Merge or moves I can better track), and WinMerge (previously I used KDiff) for manual copy-paste text diffing (like copying blocks from the code change diff to compare similar, categorically similar code, or code moves, etc)

  • Gnu diff for the basics or if I want something automating diffs, beyond compare or winmerge if I'm stuck with windows for gui tools.

30 comments