Function: magit-get-local-upstream-branch

magit-get-local-upstream-branch is a natively compiled function defined in magit-git.el.

Signature

(magit-get-local-upstream-branch &optional BRANCH)

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-git.el
(defun magit-get-local-upstream-branch (&optional branch)
  (and-let* ((upstream (magit-get-upstream-branch branch))
             (upstream (cdr (magit-split-branch-name upstream))))
    (and (magit-branch-p upstream) upstream)))