branch: elpa/git-commit commit 3f3980735f1b70bca17049bd397fe1475ffbd667 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-repolist-column-version: Highlight count and dim hash The idea is to make it easier to see which repositories could do with another release. --- lisp/magit-repos.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/magit-repos.el b/lisp/magit-repos.el index 271b80a..f803ff5 100644 --- a/lisp/magit-repos.el +++ b/lisp/magit-repos.el @@ -234,10 +234,17 @@ Usually this is just its basename." (magit-git-string "show" "--no-patch" "--format=%cd-g%h" "--date=format:%Y%m%d.%H%M")))) (save-match-data - (when (string-match "-dirty\\'" v) - (magit--put-face (1+ (match-beginning 0)) (length v) 'error v)) + (when (string-match + "\\(?:-\\([0-9]*\\)-g[a-z0-9]*\\)?\\(?:-\\(dirty\\)\\)?\\'" v) + (magit--put-face (match-beginning 0) (match-end 0) 'shadow v) + (when (match-end 1) + (magit--put-face (match-beginning 1) (match-end 1) 'bold v)) + (when (match-end 2) + (magit--put-face (match-beginning 2) (match-end 2) 'error v))) (if (and v (string-match "\\`[0-9]" v)) (concat " " v) + (when (and v (string-match "\\`[^0-9]+" v)) + (magit--put-face 0 (match-end 0) 'shadow v)) v)))) (defun magit-repolist-column-branch (_)