Function: magit-read-branch-prefer-other
magit-read-branch-prefer-other is a natively compiled function defined
in magit-git.el.
Signature
(magit-read-branch-prefer-other 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-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)))))