Function: projectile-root-bottom-up
projectile-root-bottom-up is a byte-compiled function defined in
projectile.el.
Signature
(projectile-root-bottom-up DIR &optional LIST)
Documentation
Identify a project root in DIR by bottom-up search for files in LIST.
If LIST is nil, use projectile-project-root-files-bottom-up instead.
Return the first (bottommost) matched directory or nil if not found.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-root-bottom-up (dir &optional list)
"Identify a project root in DIR by bottom-up search for files in LIST.
If LIST is nil, use `projectile-project-root-files-bottom-up' instead.
Return the first (bottommost) matched directory or nil if not found."
(let ((markers (or list projectile-project-root-files-bottom-up)))
(projectile-locate-dominating-file
dir
(if (and (null (cdr markers))
(stringp (car markers))
(not (string-match-p "/" (car markers))))
;; With a single marker a directory listing can't beat one stat
;; per level, so probe it directly. `projectile-root-marked'
;; (which runs on every root resolution) is this case.
(lambda (directory)
(projectile-file-exists-p (expand-file-name (car markers) directory)))
;; Probe each level with a single `directory-files' listing rather
;; than one `file-exists-p' per marker. A VCS marker is a directory,
;; so unlike the top-down search this one doesn't filter those out.
(lambda (directory) (projectile--directory-marker directory markers))))))