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.

  • ExtraMedicated@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 hours ago

    For comparing and selectively applying changes in many files, WinMerge is my tool of choice. But for resolving merge conflicts, I go with Tortise Git.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    12 hours ago

    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.

  • arran 🇦🇺@aussie.zone
    link
    fedilink
    arrow-up
    4
    ·
    11 hours ago

    I like kdiff3, vimdiff, and … intellij. Kdiff3 and intellij do “directories / file structures” too but I’m not sure the level you want it. Neither are cli though.

  • 6nk06@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    16 hours 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
    4
    ·
    13 hours 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.

  • lame_potato@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    2
    ·
    13 hours ago

    I’ve been using SmartGit for about a decade now. While I don’t typically need a git GUI, I do appreciate it’s diff’ing and 3-way merge.

    It’s free for open source use and they do have a lifetime license option to avoid the subscription for commercial use.

    • StrikeForceZero@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      4 hours ago

      +1 for smartgit. I just use jet brains built in git guis now but whenever I’m doing some crazy rebasing I open up smartgit. I like how it also shows you the commands in the log so you can learn by doing.

    • TehPers@beehaw.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      6 hours ago

      I bought a license many, many years ago and loved SmartGit. I just use the cli now, but if you’re looking for a GUI, it’s a great choice.

  • litchralee@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    17 hours 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.