Function: magit-repolist-column-version
magit-repolist-column-version is a natively 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 /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/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)))
(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)))))