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.

  • Nighed@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    23 days ago

    The tortoise diff tool when doing most stuff.

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

  • Gamma@beehaw.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    25 days ago

    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

  • litchralee@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    25 days ago

    I like vimdiff, since it’s fair quick to collapse and expand code chunks if you know the keyboard shortcuts. Actually, since it’s vim, knowing the keyboard shortcuts is the entire game lol.

    I usually have vimdiff open in a horizontal pane in tmux, then use the other horizontal pane to look at other code that the change references. Could I optimize and have everything in a single vim session? Sure, but at that point, I’d also want cscope set up to find references within vim, and I’m now trivial steps away from a full IDE in vim.

    … which people do have, and more power to them. But alas, I don’t have the luxury of fastidious optimization of my workflow to that degree.

  • Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    23 days ago

    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)

  • whotookkarl@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    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.

  • 6nk06@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    Beyond Compare, the pro version that does 3-way merges and stuff. I tried them all and its the best for a cheap price if you use it a lot.

  • MajorHavoc@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    I’m mainly interested in making code reviews a little easier to manage.

    One thing I haven’t seen mentioned yet, here: All future diffs become much easier to read if the team agrees to use a very strict lint tool.

    I know, I know. “Code changes should be small.” I’ve already voiced that to my team, yet here we are.

    I understand from another Lemmy thread that the tradition is to toss the offending team members’ laptop into the nearest large body of water.

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    25 days ago

    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.