diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-12-23 22:23:10 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-12-23 22:23:10 +0100 |
| commit | e4e46a775de6884cd2b92838b815bb5398c9aa9a (patch) | |
| tree | c22d1b2b5ebfd5751786907f97e085bd539d2e40 /lisp/magit-git.el | |
| parent | bfbab898a80e7bce839f65f1985076e1056aeddf (diff) | |
magit-format-ref-labels: Remove ancient kludge
Remove an ancient kludge, added in [1: 1314554cf4].
Since TODO `--simplify-by-decoration' no longer causes the `full'
in `--decorate=full' to be ignored.
1: 2015-01-22 1314554cf40e48bfc391d8392bb97e382ec0b1a5
magit-log-popup: add --simplify-by-decoration
Diffstat (limited to 'lisp/magit-git.el')
| -rw-r--r-- | lisp/magit-git.el | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el index d0afadc..5b483e5 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -2302,24 +2302,11 @@ and this option only controls what face is used.") (defun magit-format-ref-labels (string) (save-match-data - (let ((regexp "\\(, \\|tag: \\|HEAD -> \\)") - names) - (if (and (derived-mode-p 'magit-log-mode) - (member "--simplify-by-decoration" magit-buffer-log-args)) - (let ((branches (magit-list-local-branch-names)) - (re (format "^%s/.+" (regexp-opt (magit-list-remotes))))) - (setq names - (--map (cond ((string-equal it "HEAD") it) - ((string-prefix-p "refs/" it) it) - ((member it branches) (concat "refs/heads/" it)) - ((string-match re it) (concat "refs/remotes/" it)) - (t (concat "refs/" it))) - (split-string - (string-replace "tag: " "refs/tags/" string) - regexp t)))) - (setq names (split-string string regexp t))) + (let ((refs (split-string + (replace-regexp-in-string "\\(tag: \\|HEAD -> \\)" "" string) + ", " t))) (let (state head upstream tags branches remotes other combined) - (dolist (ref names) + (dolist (ref refs) (let* ((face (cdr (--first (string-match (car it) ref) magit-ref-namespaces))) (name (magit--propertize-face |
