diff-hl

https://github.com/dgutov/diff-hl.git

git clone 'git://github.com/dgutov/diff-hl.git'
129

About

diff-hl-mode highlights uncommitted changes on the left side of the window, allows you to jump between and revert them selectively.

For the usage instructions and the list of commands, see the Commentary section inside the file.

Tested with Git, Mercurial, Bazaar and SVN. May work with other VC backends, too.

The package also contains auxiliary modes:

Check out the Commentary section in each respective file for the usage instructions.

Screenshots

diff-hl-mode

Top window: a buffer in this minor mode, bottom window: the corresponding diff.

screenie

diff-hl-dired-mode

screenie

diff-hl-margin-mode

screenie

Requirements

Emacs 24+. On OS X, Emacs 24.3 or higher is recommended.

Notes

Integration

If you're using some package other than vc to commit changes, it might not run vc-checkin-hook after commits. In that case, you'll need to either add diff-hl-update to the hook it does run, or advise some function that's called in the buffer after its state has changed.

psvn

(defadvice svn-status-update-modeline (after svn-update-diff-hl activate)
  (diff-hl-update))

Magit

If you have a recent enough version installed, it defines magit-revert-buffer-hook (or magit-not-reverted-hook), which we use.