Skip to content

Instantly share code, notes, and snippets.

@mooz
Created November 28, 2012 03:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mooz/4158814 to your computer and use it in GitHub Desktop.
Save mooz/4158814 to your computer and use it in GitHub Desktop.
Ignore coding-style related changes in magit-blame
(defadvice magit-blame-file-on (around magit-blame-ignore-whitespace activate)
(let ((buffer (ad-get-arg 0)))
(save-excursion
(with-current-buffer buffer
(save-restriction
(with-temp-buffer
(magit-git-insert (list "blame"
"-w" ; ignore coding-style related changes
"--porcelain" "--"
(file-name-nondirectory
(buffer-file-name buffer))))
(magit-blame-parse buffer (current-buffer))))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment