diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2026-01-09 15:19:40 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2026-01-09 15:19:40 +0100 |
| commit | 31496bc03e3089debaa95bfd06695c4f244dc358 (patch) | |
| tree | bd7710f782b9627b726ff1648fd6693cb35424f0 | |
| parent | 9d7e06dd8c609044604d9ff0dfdc8105ce32dc7f (diff) | |
magit-get-push-branch: Support full ref as argument
| -rw-r--r-- | lisp/magit-git.el | 7 |
1 files 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))))) |
