Function: magit-read-other-branches-or-commits
magit-read-other-branches-or-commits is a byte-compiled function
defined in magit-git.el.
Signature
(magit-read-other-branches-or-commits PROMPT &optional EXCLUDE SECONDARY-DEFAULT)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defun magit-read-other-branches-or-commits
(prompt &optional exclude secondary-default)
(let* ((current (magit-get-current-branch))
(atpoint (magit-branch-or-commit-at-point))
(exclude (or exclude current))
(default (or (and (not (equal atpoint exclude))
(not (and (not current)
(magit-rev-equal atpoint "HEAD")))
atpoint)
(and (not (equal current exclude)) current)
secondary-default
(magit-get-previous-branch))))
(minibuffer-with-setup-hook #'magit--minibuf-default-add-commit
(magit-completing-read-multiple
prompt (delete exclude (magit-list-refnames))
nil 'any nil 'magit-revision-history default))))