[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/magit e4e46a775d 5/8: magit-format-ref-labels: Remove anci
From: |
Jonas Bernoulli |
Subject: |
[nongnu] elpa/magit e4e46a775d 5/8: magit-format-ref-labels: Remove ancient kludge |
Date: |
Mon, 23 Dec 2024 16:44:26 -0500 (EST) |
branch: elpa/magit
commit e4e46a775de6884cd2b92838b815bb5398c9aa9a
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
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
---
lisp/magit-git.el | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index d0afadc983..5b483e5094 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
- [nongnu] elpa/magit updated (fbb6addae6 -> 692cc5e769), Jonas Bernoulli, 2024/12/23
- [nongnu] elpa/magit 2e38d10286 3/8: manual: Fix two urls, Jonas Bernoulli, 2024/12/23
- [nongnu] elpa/magit bfbab898a8 4/8: manual: Copyedit FAQ a bit, Jonas Bernoulli, 2024/12/23
- [nongnu] elpa/magit 5cb3492464 7/8: magit-format-ref-labels: Don't strip "heads/" if tag name conflicts, Jonas Bernoulli, 2024/12/23
- [nongnu] elpa/magit 30392f4af0 6/8: magit-format-ref-labels: Cosmetics, Jonas Bernoulli, 2024/12/23
- [nongnu] elpa/magit ee7a2499cf 1/8: magit-toggle-git-debug: Improve documentation, Jonas Bernoulli, 2024/12/23
- [nongnu] elpa/magit ec1f403af1 2/8: magit-toggle-subprocess-record: New command, Jonas Bernoulli, 2024/12/23
- [nongnu] elpa/magit e4e46a775d 5/8: magit-format-ref-labels: Remove ancient kludge,
Jonas Bernoulli <=
- [nongnu] elpa/magit 692cc5e769 8/8: magit-list-special-refnames: Fix broken function, Jonas Bernoulli, 2024/12/23