From 31496bc03e3089debaa95bfd06695c4f244dc358 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Fri, 9 Jan 2026 15:19:40 +0100 Subject: magit-get-push-branch: Support full ref as argument --- lisp/magit-git.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/magit-git.el b/lisp/magit-git.el index 26a9718..eaa132a 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -1874,9 +1874,10 @@ according to the branch type." (defun magit-get-push-branch (&optional branch verify) (magit--with-refresh-cache (list default-directory 'magit-get-push-branch branch verify) - (and-let* ((branch (or branch (setq branch (magit-get-current-branch)))) - (remote (magit-get-push-remote branch)) - (target (concat remote "/" branch))) + (and-let* + ((branch (magit-ref-abbrev (or branch (magit-get-current-branch)))) + (remote (magit-get-push-remote branch)) + (target (concat remote "/" branch))) (and (or (not verify) (magit-rev-verify target)) (magit--propertize-face target 'magit-branch-remote))))) -- cgit v1.0