diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index ca55fec89..6301fa13d 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -114,9 +114,12 @@ window that already exists in that direction. It will split otherwise." (kill-local-variable '+magit--stale-p) (when (magit-auto-revert-repository-buffer-p buffer) (save-restriction + (cl-incf magit-auto-revert-counter) (when (bound-and-true-p vc-mode) - (vc-refresh-state)) - (when (and buffer-file-name (not (buffer-modified-p buffer))) + (let ((vc-follow-symlinks t)) + (vc-refresh-state))) + (when (and (not (get-buffer-process buffer)) + (funcall buffer-stale-function t)) (revert-buffer t t t)) (force-mode-line-update)))))