Function: magit-repolist-column-version
magit-repolist-column-version is a byte-compiled function defined in
magit-repos.el.
Signature
(magit-repolist-column-version _)
Documentation
Insert a description of the repository's HEAD revision.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-repos.el
(defun magit-repolist-column-version (_)
"Insert a description of the repository's `HEAD' revision."
(and-let ((v (or (magit-git-string "describe" "--tags" "--dirty")
;; If there are no tags, use the date in MELPA format.
(magit-rev-format "%cd-g%h" nil
"--date=format:%Y%m%d.%H%M"))))
(save-match-data
(when (string-match magit-repolist-column-version-regexp v)
(magit--put-face (match-beginning 0) (match-end 0) 'shadow v)
(when (match-end 2)
(magit--put-face (match-beginning 2) (match-end 2) 'bold v))
(when (match-end 4)
(magit--put-face (or (match-beginning 3) (match-beginning 4))
(match-end 4) 'error v))
(when (and (equal (match-str 2 v) "1")
(string-match-p magit-repolist-column-version-resume-regexp
(magit-rev-format "%s")))
(setq v (replace-match (propertize "+" 'face 'shadow) t t v 1))))
(cond ((not v) nil)
((string-match "\\`[0-9]" v)
(concat " " v))
((string-match "\\`[^0-9]+" v)
(magit--put-face 0 (match-end 0) 'shadow v)
v)))))