Function: magit--select-push-remote

magit--select-push-remote is a byte-compiled function defined in magit-remote.el.

Signature

(magit--select-push-remote PROMPT-SUFFIX)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-remote.el
(defun magit--select-push-remote (prompt-suffix)
  (let* ((branch (or (magit-get-current-branch)
                     (user-error "No branch is checked out")))
         (remote (magit-get-push-remote branch))
         (changed nil))
    (when (or current-prefix-arg
              (not remote)
              (not (member remote (magit-list-remotes))))
      (setq changed t)
      (setq remote
            (magit-read-remote (format "Set %s and %s"
                                       (magit--push-remote-variable)
                                       prompt-suffix)))
      (setf (magit-get (magit--push-remote-variable branch)) remote))
    (list branch remote changed)))