Hacker News
Show HN: Deff – Side-by-side Git diff review in your terminal
Would love to get some feedback
llbbdd
|next
[-]
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.
thamer
|root
|parent
|next
[-]
The two are kind of similar if I remember correctly, and both offer a lot of config options to change the style and more. I mostly use it for diffs involving long lines since it highlights changes within a line, which makes it easier to spot such edits.
I have an alias set in `~/.gitconfig` to pipe the output of `git diff` (with options) to `diff-so-fancy` with `git diffs`:
diffs = "!f() { git diff $@ | diff-so-fancy; }; f"
[1] https://github.com/so-fancy/diff-so-fancy
flamestro
|root
|parent
|next
|previous
[-]
kodomomo
|root
|parent
|next
|previous
[-]
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.
llbbdd
|root
|parent
[-]
mckn1ght
|root
|parent
|next
|previous
[-]
k_bx
|next
|previous
[-]
- 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"
meain
|next
|previous
[-]
flamestro
|root
|parent
|next
[-]
lf-non
|root
|parent
|previous
[-]
Amorymeltzer
|root
|parent
[-]
rileymichael
|next
|previous
[-]
ZoomZoomZoom
|next
|previous
[-]
yottamus
|next
|previous
[-]
git difftool --tool=vimdiff
flamestro
|root
|parent
|next
[-]
PhilipRoman
|root
|parent
[-]
vim folds are fully programmable. For me a bigger issue was git calling vimdiff for each file, which I fixed with my own difftool: https://gist.github.com/PhilipRoman/60066716b5fa09fcabfa6c95...
jamiecode
|next
|previous
[-]
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.
flamestro
|root
|parent
|next
[-]
rileymichael
|root
|parent
|previous
[-]
raphinou
|next
|previous
[-]
greatgib
|next
|previous
[-]
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.
pwdisswordfishy
|root
|parent
|next
[-]
flamestro
|root
|parent
|next
|previous
[-]
It does not install binaries, it builds the binary by checking out the project basically. You can also do the process manually and use the tool.
teddyh
|next
|previous
[-]
emacs --eval='(ediff-files "file1" "file2")'
(The “|” key toggles side-by-side view.)
hatradiowigwam
|next
|previous
[-]
dec0dedab0de
|next
|previous
[-]
...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.
insane_dreamer
|previous
[-]
What is most useful though is a 3-panel setup, like JetBrains -- still the best git client I have worked with.