Function: projectile--read-git-ref

projectile--read-git-ref is a byte-compiled function defined in projectile.el.

Signature

(projectile--read-git-ref ROOT)

Documentation

Read a git revision to compare against, completing over ROOT's branches.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--read-git-ref (root)
  "Read a git revision to compare against, completing over ROOT\\='s branches."
  (let ((branches (when-let* ((output (projectile--git
                                       root "for-each-ref" "--format=%(refname:short)"
                                       "refs/heads" "refs/remotes")))
                    (split-string output "\n" t))))
    (completing-read "Compare against: " branches nil nil nil nil
                     (car (member "main" branches)))))