Function: magit-read-branch-prefer-other
magit-read-branch-prefer-other is a byte-compiled function defined in
magit-git.el.
Signature
(magit-read-branch-prefer-other PROMPT)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defun magit-read-branch-prefer-other (prompt)
(let* ((current (magit-get-current-branch))
(commit (magit-commit-at-point))
(atrev (and commit (magit-list-branches-pointing-at commit)))
(atpoint (magit--painted-branch-at-point)))
(magit-completing-read prompt (magit-list-branch-names)
nil t nil 'magit-revision-history
(or (magit-section-value-if 'branch)
atpoint
(and (not (cdr atrev)) (car atrev))
(seq-find (##not (equal % current)) atrev)
(magit-get-previous-branch)
(car atrev)))))