Function: magit-read-remote-branch

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

Signature

(magit-read-remote-branch PROMPT &optional REMOTE DEFAULT LOCAL-BRANCH REQUIRE-MATCH)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defun magit-read-remote-branch
    (prompt &optional remote default local-branch require-match)
  (let ((choice (magit-completing-read
                 prompt
                 (cl-union (and local-branch
                                (if remote
                                    (list local-branch)
                                  (mapcar (##concat % "/" local-branch)
                                          (magit-list-remotes))))
                           (magit-list-remote-branch-names remote t)
                           :test #'equal)
                 nil (or require-match 'any)
                 nil 'magit-revision-history default)))
    (if (or remote (string-match "\\`\\([^/]+\\)/\\(.+\\)" choice))
        choice
      (user-error "`%s' doesn't have the form REMOTE/BRANCH" choice))))