Function: treemacs--resize-git-cache

treemacs--resize-git-cache is a byte-compiled function defined in treemacs-async.el.

Signature

(treemacs--resize-git-cache)

Documentation

Cuts treemacs--git-cache back down to size.

Specifically its size will be reduced to half of treemacs--git-cache-max-size.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-async.el
(defun treemacs--resize-git-cache ()
  "Cuts `treemacs--git-cache' back down to size.
Specifically its size will be reduced to half of `treemacs--git-cache-max-size'."
  (treemacs-block
   (let* ((size (ht-size treemacs--git-cache))
          (count (- size (/ treemacs--git-cache-max-size 2))))
     (treemacs--maphash treemacs--git-cache (key _)
       (ht-remove! treemacs--git-cache key)
       (when (>= 0 (cl-decf count))
         (treemacs-return :done))))))