Function: projectile--vcs-ignored-subset
projectile--vcs-ignored-subset is a byte-compiled function defined in
projectile.el.
Signature
(projectile--vcs-ignored-subset ROOT RELATIVES)
Documentation
Return the members of RELATIVES that the VCS at ROOT ignores.
One git check-ignore\= answers for the whole list, which is what makes
this usable from the watch path - a process per file would not be.
Returns nil for anything but git, and for a git that fails; treating the
answer as "nothing is ignored" is conservative, since the only cost is
the drift this exists to remove.
call-process-region\= rather than a TRAMP-aware call because watches are
never armed for a remote project in the first place.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--vcs-ignored-subset (root relatives)
"Return the members of RELATIVES that the VCS at ROOT ignores.
One `git check-ignore\\=' answers for the whole list, which is what makes
this usable from the watch path - a process per file would not be.
Returns nil for anything but git, and for a git that fails; treating the
answer as \"nothing is ignored\" is conservative, since the only cost is
the drift this exists to remove.
`call-process-region\\=' rather than a TRAMP-aware call because watches are
never armed for a remote project in the first place."
(when (and relatives (eq (projectile-project-vcs root) 'git))
(let ((default-directory root))
(with-temp-buffer
;; Exit status 1 means "none of them are ignored", which is an
;; answer rather than a failure; only 0 produces output.
(when (eq 0 (ignore-errors
(call-process-region
(mapconcat #'identity relatives "\0") nil
"git" nil t nil
"check-ignore" "-z" "--stdin")))
(split-string (buffer-string) "\0" t))))))