Function: magit-insert-tags-header
magit-insert-tags-header is a byte-compiled function defined in
magit-status.el.
Signature
(magit-insert-tags-header)
Documentation
Insert a header line about the current and/or next tag.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-status.el
(defun magit-insert-tags-header ()
"Insert a header line about the current and/or next tag."
(let* ((this-tag (magit-get-current-tag nil t))
(next-tag (magit-get-next-tag nil t))
(this-cnt (cadr this-tag))
(next-cnt (cadr next-tag))
(this-tag (car this-tag))
(next-tag (car next-tag))
(both-tags (and this-tag next-tag t)))
(when (or this-tag next-tag)
(magit-insert-section (tag (or this-tag next-tag))
(insert (format "%-10s" (if both-tags "Tags: " "Tag: ")))
(cl-flet ((insert-count (tag count face)
(insert (concat (propertize tag 'font-lock-face 'magit-tag)
(and (> count 0)
(format " (%s)"
(propertize
(format "%s" count)
'font-lock-face face)))))))
(when this-tag (insert-count this-tag this-cnt 'magit-branch-local))
(when both-tags (insert ", "))
(when next-tag (insert-count next-tag next-cnt 'magit-tag)))
(insert ?\n)))))