Function: magit--list-releases

magit--list-releases is a byte-compiled function defined in magit-tag.el.

Signature

(magit--list-releases)

Documentation

Return a list of releases.

The list is ordered, beginning with the highest release. Each release element has the form (VERSION TAG MESSAGE). magit-release-tag-regexp is used to determine whether a tag qualifies as a release tag.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260822.1158/magit-tag.el
(defun magit--list-releases ()
  "Return a list of releases.
The list is ordered, beginning with the highest release.
Each release element has the form (VERSION TAG MESSAGE).
`magit-release-tag-regexp' is used to determine whether
a tag qualifies as a release tag."
  (save-match-data
    (mapcar
     #'cdr
     (compat-call
      sort (seq-keep
            (lambda (line)
              (and-let*
                  ((_(string-match " +" line))
                   (tag (substring line 0 (match-beginning 0)))
                   (msg (substring line (match-end 0)))
                   (_(string-match magit-release-tag-regexp tag))
                   (ver (match-str 2 tag))
                   (version-regexp-alist magit-tag-version-regexp-alist))
                (list (version-to-list ver) ver tag msg)))
            ;; Cannot rely on "--sort=-version:refname" because
            ;; that gets confused if the version prefix has changed.
            (magit-git-lines "tag" "-n"))
      :lessp #'version-list-< :reverse t :key #'car))))