Function: projectile--checkout-branch

projectile--checkout-branch is a byte-compiled function defined in projectile.el.

Signature

(projectile--checkout-branch ROOT)

Documentation

Return the branch checked out at ROOT, or nil when that isn't knowable.

Read out of the checkout's own files rather than by running the version control system, since this is asked once per candidate checkout.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--checkout-branch (root)
  "Return the branch checked out at ROOT, or nil when that isn't knowable.

Read out of the checkout's own files rather than by running the version
control system, since this is asked once per candidate checkout."
  (pcase (projectile-project-vcs root)
    ('git (when-let* ((git-dir (projectile--git-dir root)))
            (projectile--git-head-branch git-dir)))))