Show HN: Deff – side-by-side Git diff review in your terminal
49 points
4 hours ago
| 13 comments
| github.com
| HN
deff is an interactive Rust TUI for reviewing git diffs side-by-side with syntax highlighting and added/deleted line tinting. It supports keyboard/mouse navigation, vim-style motions, in-diff search (/, n, N), per-file reviewed toggles, and both upstream-based and explicit --base/--head comparisons. It can also include uncommitted + untracked files (--include-uncommitted) so you can review your working tree before committing.

Would love to get some feedback

greatgib
2 minutes ago
[-]
It blows my mind that nowadays, some random tools on internet tells you to do "curl -fsSL https://.... | bash" to install some "binary" things and a lot of people will do it without hesitation.

It probably explains why there is so many data leaks recently but it is like we did a 20 years jump back in time in terms of security in just a few years.

reply
llbbdd
2 hours ago
[-]
I was looking for a good TUI tool for diffs recently, but I'm not sure yet if what I want exists already (and I don't think this tool does it (yet?)). I've been moving my workflow out of VSCode as I'm using TUI-driven coding agents more often lately but one thing I miss from my VSCode/GitHub workflow is the ability to provide a comment on lines or ranges in a diff to provide targeted feedback to the agent. Most diff tools seem to be (rightfully) focused on cleanly visualizing changes and not necessarily iterating on the change.

I admit I haven't looked super hard yet, I settled on configuring git to use delta [0] for now and I'm happy with it, but I'm curious if anyone has a workflow for reviewing/iterating on diffs in the terminal that they'd be willing to share. Also open to being told that I'm lightyears behind and that there's a better mental model for this.

[0] https://github.com/dandavison/delta/

reply
flamestro
26 minutes ago
[-]
I was also searching for some time, but most of them did not have enough context for my workflow tbh. So thats why I decided to make deff. Another good one I liked is vimdiff
reply
kodomomo
1 hour ago
[-]
Octo [0] for nvim lets you submit reviews, add comments on ranges, reply to threads, etc.

This in conjunction with gh-dash [1] to launch a review can get you a pretty nice TUI review workflow.

[0] https://github.com/pwntester/octo.nvim

[1] https://github.com/dlvhdr/gh-dash

*Edit: I see you meant providing feedback to an agent, not a PR. Well that's what I get for reading too fast.

reply
llbbdd
15 minutes ago
[-]
No problem, I appreciate another reason to look at Neovim; I do sometimes have a need to interact with GH's actual PR flow and once I've moved the rest of my workflow out of VSCode, Neovim looks like the best option for the last mile of actually writing and editing code. I just have to commit the time to set it up with everything I probably take for granted in VSCode's editor.
reply
mckn1ght
1 hour ago
[-]
I use delta for quick diffs in a shell (along with the -U0 option on git-diff), but in my claude workflow, i have a 3 pane setup in tmux: :| where the right side is a claude session, the top left is emacs opened to magit, and the bottom left is a shell. Magit makes navigating around a diff pretty easy (as well as all the other git operations), and I can dive into anything and hand edit as well.
reply
jfyne
1 hour ago
[-]
Not TUI based but I made something called meatcheck. The idea being that the LLM requests a review from the human, you can leave inline comments like a PR review.

Once you submit it outputs to stdout and the agent reads your comments and actions them.

https://github.com/jfyne/meatcheck

reply
coryrc
1 hour ago
[-]
magit
reply
k_bx
2 hours ago
[-]
What I would love to see is "tig" replacement that is:

- even faster, especially if you have couple thousand files and just want to press "u" for some time and see them very quickly all get staged

- has this split-view diff opened for a file

Otherwise tig is one of my favorite tools to quickly commit stuff without too many key presses but with review abilities, i have its "tig status" aliased to "t"

reply
meain
3 hours ago
[-]
I have been using https://github.com/jeffkaufman/icdiff for the longest time to get side by side diffs.
reply
flamestro
44 minutes ago
[-]
This looks great as well! I personally prefer a bit more context. Thats why I added a bit more of it to deff. It also allows to mark files as reviewed by pressing `r` which is quite handy for my flow.
reply
lf-non
2 hours ago
[-]
I also use icdiff, but it is good to have the file-awareness for git diff esp. the ability to quickly skip files that I know aren't important.
reply
Amorymeltzer
2 hours ago
[-]
For that in particular, I use delta (<https://github.com/dandavison/delta>) with `side-by-side = true` enabled. I find I use both icdiff and delta side-by-side on a regular basis.
reply
behnamoh
2 hours ago
[-]
Delta is so much faster than icdiff too.
reply
rileymichael
2 hours ago
[-]
getting users to adopt a new tool with its own incantations is a tough sell. git supports specifying an external pager so folks can plug in alternatives (such as https://github.com/dandavison/delta) while still using the familiar git frontend
reply
yottamus
2 hours ago
[-]

    git difftool --tool=vimdiff
reply
flamestro
41 minutes ago
[-]
I personally find vimdiff a bit harder to navigate for my usecase. The reason is that I am context unaware of the file often in larger projects and wanted something that allows me to check all lines in a touched file. However, I have to admit vimdiff comes quite close to what I need and is a great tool!
reply
metalliqaz
2 hours ago
[-]
but is it blazingly fast?
reply
syngrog66
1 hour ago
[-]
if its not in Rust or browser-based or a "cloud" service or the result of multi-GWH of LLM "training" or a VSCode plugin or ideally all of the prior then the HN kids wont be interested :-)
reply
jamiecode
2 hours ago
[-]
The specific gap side-by-side covers for me is reviewing changes on a remote box without firing up an IDE. Delta is great but keeps the unified format. icdiff does the split view but is pretty barebones. So there's definitely space here.

What nobody's mentioned yet is difftastic. Takes a completely different approach - parses syntax trees instead of lines, so indentation changes and bracket shuffles don't show up as noise. Worth a look if you're comparing options.

Main question I'd have: how does it hold up on large files? 5k+ line diffs are where most of these tools either choke or produce unreadable output. That'd be the test I'd run first.

reply
flamestro
39 minutes ago
[-]
So I tested this on huge files (checking cargo lock for instance) and it is super fast in the navigation of those. Until now I did not encounter any issue with bigger files (around 4k-6k changes but also only 4k-6k lines).
reply
rileymichael
1 hour ago
[-]
reply
raphinou
1 hour ago
[-]
Looks interesting. I'm currently using https://tuicr.dev/ , of which I like that the first screen it shows is the choice of commit range you want to review. Might be something to consider for deff?
reply
ZoomZoomZoom
2 hours ago
[-]
Why shouldn't this be a simple wrapper to tie Delta to some kind of file browser or a thing like television[1]?

[1]: https://alexpasmantier.github.io/television/

reply
syngrog66
1 hour ago
[-]
television??
reply
teddyh
2 hours ago
[-]

  emacs --eval='(ediff-files "file1" "file2")'
(The “|” key toggles side-by-side view.)
reply
flamestro
38 minutes ago
[-]
Yes, but emacs < vim
reply
hatradiowigwam
1 hour ago
[-]
vimdiff is pretty fast, and is likely installed on your linux system without you realizing it.
reply
flamestro
38 minutes ago
[-]
Its a great tool, but misses some of the context I needed.
reply
dec0dedab0de
41 minutes ago
[-]
looks pretty good at a glance, though I would like to see three views for handling conflicts. Target on the left, source on the right, and the combined result in the middle.

...I really just like the way the Jetbrains IDEs do it, and I wish there were a TUI version that I could launch automatically from the git cli.

reply
insane_dreamer
1 hour ago
[-]
we need something like this in lazygit -- which is excellent all around but lacking in visual diffing/merging.

What is most useful though is a 3-panel setup, like JetBrains -- still the best git client I have worked with.

reply
flamestro
37 minutes ago
[-]
What would the third panel contain in this case? Do you mean the setup that IntelliJ has in merge conflicts?
reply