Function: projectile--watch-drop-vcs-ignored
projectile--watch-drop-vcs-ignored is a byte-compiled function defined
in projectile.el.
Signature
(projectile--watch-drop-vcs-ignored PROJECT ADDED)
Documentation
Remove from PROJECT's cache the ADDED paths its VCS ignores.
The watch path applies Projectile's own ignore rules, which know nothing
about a .gitignore\=; under alien\= and hybrid\= indexing the VCS is
what produced the file list, so without this a watched project slowly
gains files a re-index would never have listed (see issue #1075, which
fixed the same hole for files opened by hand).
Returns non-nil when the cache was changed.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--watch-drop-vcs-ignored (project added)
"Remove from PROJECT\\='s cache the ADDED paths its VCS ignores.
The watch path applies Projectile\\='s own ignore rules, which know nothing
about a `.gitignore\\='; under `alien\\=' and `hybrid\\=' indexing the VCS is
what produced the file list, so without this a watched project slowly
gains files a re-index would never have listed (see issue #1075, which
fixed the same hole for files opened by hand).
Returns non-nil when the cache was changed."
(when (memq projectile-indexing-method '(alien hybrid))
(when-let* ((ignored (projectile--vcs-ignored-subset project added)))
(let ((set (make-hash-table :test 'equal :size (length ignored))))
(dolist (file ignored) (puthash file t set))
(puthash project
(seq-remove (lambda (file) (gethash file set))
(gethash project projectile-projects-cache))
projectile-projects-cache)
t))))