Fork me on GitHub
#emacs
<
2020-02-17
>
vemv23:02:03

I think a couple years ago I had a git diff setup such that it displayed the diffs inline, within the current buffer (as opposed to allocating a distinct buffer just for the diffs) Maybe it was magit-based. The result looked similar to when one resolves merge conflicts with vc mode: some lines would be applied a green background, others a red one. Anyone has a such a setup? Can't find a satisfactory answer

vemv23:02:03

Maybe I abandoned the idea back then because clojure-mode coloring wouldn't play nicely with git diff coloring... eg. syntax would look broken

vemv23:02:07

Ah yes now I'm remembering better... for the following screenshot (very similar to what I had in mind), if both red and green lines start with ( but don't close with a ), that would screw things:

practicalli-johnny08:02:46

I only use that view in Magit status, especially when staging specific lines of a change. For the source file buffer, I have marks in the right hand fringe which shows the lines that have changed, but not the diffs. I use vc-ediff if I want to compare the working copy to the HEAD commit. That seems to cover everything for me.

ak-coram13:02:04

I also use diff-hl in combination with magit: https://github.com/dgutov/diff-hl

vemv12:02:54

hey guys, I had forgotten about this one sorry looks like you both use a "fringe-based" approach. how well does it work for you? I recall giving a serious try to https://github.com/syohex/emacs-git-gutter but I had to desist as I found out it's an unmaintained program with some several flaws (things could easily fall out of sync, etc) Now I'd be a bit afraid of investing time in integrating a new lib again...

practicalli-johnny16:02:47

This is my config, works really well for me. https://practicalli.github.io/spacemacs/source-control/add-layers.html I use fringe as an indicator of change. To stage, commit or push I use magit status

👍 4
👀 4