Fork me on GitHub

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


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


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:


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.


I also use diff-hl in combination with magit:


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 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...


This is my config, works really well for me. I use fringe as an indicator of change. To stage, commit or push I use magit status

👍 4
👀 4