diff --git a/magit.el b/magit.el index 918ec6dd..d1631a6d 100644 --- a/magit.el +++ b/magit.el @@ -1719,12 +1719,12 @@ Please see the manual for a complete description of Magit. (defun magit-string-has-prefix-p (string prefix) (eq (compare-strings string nil (length prefix) prefix nil nil) t)) -(defun magit-revert-buffers (dir) +(defun magit-revert-buffers (dir &optional ignore-modtime) (dolist (buffer (buffer-list)) (when (and buffer (buffer-file-name buffer) (magit-string-has-prefix-p (buffer-file-name buffer) dir) - (not (verify-visited-file-modtime buffer)) + (or ignore-modtime (not (verify-visited-file-modtime buffer))) (not (buffer-modified-p buffer))) (with-current-buffer buffer (ignore-errors @@ -3082,6 +3082,7 @@ Prefix arg means justify as well." (bury-buffer) (when (file-exists-p ".git/MERGE_MSG") (delete-file ".git/MERGE_MSG")) + (magit-revert-buffers default-directory t) (when magit-pre-log-edit-window-configuration (set-window-configuration magit-pre-log-edit-window-configuration) (setq magit-pre-log-edit-window-configuration nil))))