How to list all lines with changes to easily navigate between changes with emacs?

I would like git to show me all lines that changed between two specific commits, including the filename and the line number on each line. I imagine the output to be similar to

file.cpp:20:- void deletedFunction()
file.cpp:20:+ int addedFunction()
Makefile:3:-# removed comment

I want to use this to navigate easily through all changed of a commit with emacs via the next-error command of the compile-mode. So, the exact output after the second : can look different, but filename:line:... should be there. Also, not all changes have to be listed — additions-only or deleteions-only would be ok for a start, too.

1 Solution

Nice to see my comment solved your question :)
I said:
«I’d like to know (mandatory question): are you not satisfied with magit, and why ? you can see diffs, navigate and hit to go to the file and line nb. Looks good to me.»

Magit manual lives here:
and code on github:

a complete intro:

(as usual, it is available with ELPA: M-x list-packages)

Enjoy !

ps: two configs I use:

; use ido to switch branches
(setq magit-completing-read-function 'magit-ido-completing-read)
;; open magit status in same window as current buffer
;; (setq magit-status-buffer-switch-function 'switch-to-buffer)
;; highlight word/letter changes in hunk diffs
(setq magit-diff-refine-hunk t)