Function: projectile-project-worktrees

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

Signature

(projectile-project-worktrees &optional PROJECT-ROOT)

Documentation

Return the checkouts of PROJECT-ROOT's repository, including itself.

Every function in projectile-worktree-functions is consulted in turn and their results merged, de-duplicated by resolved path so that a worktree both git and the known projects report is listed once - the first function to report it wins, which is why the one that knows the most about a checkout should come first. The plists that come back carry
:path, and :label/:prunable when whoever found them knew.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-project-worktrees (&optional project-root)
  "Return the checkouts of PROJECT-ROOT\\='s repository, including itself.

Every function in `projectile-worktree-functions' is consulted in turn and
their results merged, de-duplicated by resolved path so that a worktree
both git and the known projects report is listed once - the first
function to report it wins, which is why the one that knows the most
about a checkout should come first.  The plists that come back carry
`:path', and `:label'/`:prunable' when whoever found them knew."
  (projectile--collect-from-functions
   projectile-worktree-functions
   (or project-root (projectile-acquire-root))
   (lambda (worktree)
     (when-let* ((path (plist-get worktree :path)))
       (projectile--directory-key path)))
   "Worktree"))