perf(magit): noop +magit-mark-stale-buffers-h if disabled

A little less work to do.
This commit is contained in:
Henrik Lissner
2025-04-13 00:00:12 -04:00
parent b2f8529683
commit 6e92ca594f

View File

@ -125,6 +125,7 @@ window that already exists in that direction. It will split otherwise."
Stale buffers are reverted when they are switched to, assuming they haven't been
modified."
(when +magit-auto-revert
(let ((visible-buffers (doom-visible-buffers nil t)))
(dolist (buffer (buffer-list))
(when (+magit--revertable-buffer-p buffer)
@ -133,7 +134,7 @@ modified."
(+magit--revert-buffer buffer)
(cl-callf2 delq buffer visible-buffers)) ; hasten future lookups
(with-current-buffer buffer
(setq-local +magit--stale-p t)))))))
(setq-local +magit--stale-p t))))))))
;;;###autoload
(defun +magit-revert-buffer-maybe-h ()