Function: magit-read-other-branch

magit-read-other-branch is a byte-compiled function defined in magit-git.el.

Signature

(magit-read-other-branch PROMPT &optional EXCLUDE SECONDARY-DEFAULT)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defun magit-read-other-branch
    (prompt &optional exclude secondary-default)
  (let* ((current (magit-get-current-branch))
         (atpoint (magit-branch-at-point))
         (exclude (or exclude current))
         (default (or (and (not (equal atpoint exclude)) atpoint)
                      (and (not (equal current exclude)) current)
                      secondary-default
                      (magit-get-previous-branch))))
    (magit-completing-read prompt (delete exclude (magit-list-branch-names))
                           nil t nil 'magit-revision-history default)))