Skip to content

Commit

Permalink
magit-revert-buffers: don't use auto-revert-handler
Browse files Browse the repository at this point in the history
`auto-revert-handler' is only intended for internal use and indeed a
change to it broke our use of it.  (But I think that change might be
a bug).  Instead copy the small parts of that function which are
actually relevant to us into `magit-revert-buffers'.

Fixes #1821 and #1844.
  • Loading branch information
tarsius committed May 9, 2015
1 parent 40f33c9 commit e07db2e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions magit.el
Expand Up @@ -4065,8 +4065,13 @@ the current repository."
(and file (string-prefix-p topdir file)
(not (string-prefix-p gitdir file))
(member (file-relative-name file topdir) tracked)
(let ((auto-revert-mode t))
(auto-revert-handler)
(let ((remote-file-name-inhibit-cache t))
(setq auto-revert-notify-modified-p nil)
(when auto-revert-verbose
(message "Reverting buffer `%s'." (buffer-name)))
(let ((buffer-read-only buffer-read-only))
(revert-buffer 'ignore-auto 'dont-ask 'preserve-modes))
(vc-find-file-hook)
(run-hooks 'magit-revert-buffer-hook))))))))))

;;; (misplaced)
Expand Down

0 comments on commit e07db2e

Please sign in to comment.