diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-12-23 22:23:12 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-12-23 22:23:12 +0100 |
| commit | 5cb3492464fee6fc9ee8749f6c70fc72b732cf79 (patch) | |
| tree | afaf62964f912c77659201ac5f278818f70fd6c8 /lisp/magit-git.el | |
| parent | 30392f4af010279d7f2998a51f0b9e425e4d3fec (diff) | |
magit-format-ref-labels: Don't strip "heads/" if tag name conflicts
Diffstat (limited to 'lisp/magit-git.el')
| -rw-r--r-- | lisp/magit-git.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el index 2437bb2..c7e64d4 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -2309,8 +2309,13 @@ and this option only controls what face is used.") (dolist (ref refs) (let* ((face (cdr (--first (string-match (car it) ref) magit-ref-namespaces))) - (name (magit--propertize-face - (or (match-string 1 ref) ref) face))) + (name (match-string 1 ref)) + (name (if (and name + (not (string-prefix-p "refs/tags/" ref)) + (magit-rev-verify (concat "refs/tags/" name))) + (magit-ref-abbrev ref) + (or name ref))) + (name (magit--propertize-face name face))) (cl-case face ((magit-bisect-bad magit-bisect-skip magit-bisect-good) (setq state name)) |
