Function: magit-split-branch-name
magit-split-branch-name is a natively compiled function defined in
magit-git.el.
Signature
(magit-split-branch-name BRANCH)
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-git.el
(defun magit-split-branch-name (branch)
(cond ((member branch (magit-list-local-branch-names))
(cons "." branch))
((string-match "/" branch)
(or (seq-some (lambda (remote)
(and (string-match
(format "\\`\\(%s\\)/\\(.+\\)\\'" remote)
branch)
(cons (match-str 1 branch)
(match-str 2 branch))))
(magit-list-remotes))
(error "Invalid branch name %s" branch)))))