diff --git a/magit.el b/magit.el index a533c58e..40dfe6f8 100644 --- a/magit.el +++ b/magit.el @@ -1454,7 +1454,14 @@ Please see the manual for a complete description of Magit. nil)) (defun magit-wash-untracked-files () - (magit-wash-sequence #'magit-wash-untracked-file)) + ;; Setting magit-old-top-section to nil speeds up washing: no time + ;; is wasted looking up the old visibility, which doesn't matter for + ;; untracked files. + ;; + ;; XXX - speed this up in a more general way. + ;; + (let ((magit-old-top-section nil)) + (magit-wash-sequence #'magit-wash-untracked-file))) (defun magit-insert-untracked-files () (magit-git-section 'untracked "Untracked files:"