Function: projectile--project-el-ignore-glob

projectile--project-el-ignore-glob is a byte-compiled function defined in projectile.el.

Signature

(projectile--project-el-ignore-glob GLOB)

Documentation

Translate the gitignore GLOB into project.el's project-ignores format.

There a root-anchored pattern is spelled with a leading ./ instead of gitignore's leading / (or an interior slash), and everything else matches at any depth.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--project-el-ignore-glob (glob)
  "Translate the gitignore GLOB into project.el's `project-ignores' format.
There a root-anchored pattern is spelled with a leading `./' instead of
gitignore's leading `/' (or an interior slash), and everything else
matches at any depth."
  (let ((body (string-remove-suffix "/" glob)))
    (if (string-search "/" body)
        (concat "./" (string-remove-prefix "/" glob))
      glob)))