Skip to content

Instantly share code, notes, and snippets.

@cofi
Created July 7, 2011 19:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cofi/1070347 to your computer and use it in GitHub Desktop.
revert all(!!) buffers after git pull
(require 'cl)
(defadvice magit-pull (after refresh-buffers-after-pull activate)
(loop for buffer in (buffer-list)
when (buffer-file-name buffer)
do (with-current-buffer buffer
(if (buffer-modified-p buffer)
;; ask for confirmation on modified buffers
(revert-buffer)
(revert-buffer 'ignore-auto 'noconfirm)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment