Function: projectile-get-immediate-sub-projects
projectile-get-immediate-sub-projects is a byte-compiled function
defined in projectile.el.
Signature
(projectile-get-immediate-sub-projects PATH)
Documentation
Get immediate sub-projects for a given project without recursing.
PATH is the vcs root or project root from which to start
searching, and should end with an appropriate path delimiter, such as
'/' or a '\'.
If the vcs get-sub-projects query returns results outside of path, they are excluded from the results of this function.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defun projectile-get-immediate-sub-projects (path)
"Get immediate sub-projects for a given project without recursing.
PATH is the vcs root or project root from which to start
searching, and should end with an appropriate path delimiter, such as
'/' or a '\\'.
If the vcs get-sub-projects query returns results outside of path,
they are excluded from the results of this function."
(let* ((vcs (projectile-project-vcs path))
;; search for sub-projects under current project `project'
(submodules (mapcar
(lambda (s)
(file-name-as-directory (expand-file-name s path)))
(projectile-files-via-ext-command path (projectile-get-sub-projects-command vcs))))
(project-child-folder-regex
(concat "\\`"
(regexp-quote path))))
;; If project root is inside of an VCS folder, but not actually an
;; VCS root itself, submodules external to the project will be
;; included in the VCS get sub-projects result. Let's remove them.
(seq-filter
(lambda (submodule)
(string-match-p project-child-folder-regex
submodule))
submodules)))