Function: magit-read-local-branch-or-commit
magit-read-local-branch-or-commit is a natively compiled function
defined in magit-git.el.
Signature
(magit-read-local-branch-or-commit PROMPT)
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-git.el
(defun magit-read-local-branch-or-commit (prompt)
(let ((choices (nconc (magit-list-local-branch-names)
(magit-list-special-refnames)))
(commit (magit-commit-at-point)))
(when commit
(push commit choices))
(minibuffer-with-setup-hook #'magit--minibuf-default-add-commit
(magit-completing-read prompt choices
nil 'any nil 'magit-revision-history
(or (magit-local-branch-at-point) commit)))))