Created
July 7, 2011 19:38
-
-
Save cofi/1070347 to your computer and use it in GitHub Desktop.
revert all(!!) buffers after git pull
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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