Function: magit-get-upstream-ref
magit-get-upstream-ref is a byte-compiled function defined in
magit-git.el.
Signature
(magit-get-upstream-ref &optional BRANCH)
Documentation
Return the upstream branch of BRANCH as a fully qualified ref.
It BRANCH is nil, then return the upstream of the current branch,
if any, nil otherwise. If the upstream is not configured, the
configured remote is an url, or the named branch does not exist,
then return nil. I.e., return an existing local or
remote-tracking branch ref.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defun magit-get-upstream-ref (&optional branch)
"Return the upstream branch of BRANCH as a fully qualified ref.
It BRANCH is nil, then return the upstream of the current branch,
if any, nil otherwise. If the upstream is not configured, the
configured remote is an url, or the named branch does not exist,
then return nil. I.e., return an existing local or
remote-tracking branch ref."
(and$ (or branch (magit-get-current-branch))
(magit-ref-fullname (concat $ "@{upstream}"))))