Function: magit-insert-branch-description
magit-insert-branch-description is a byte-compiled function defined in
magit-refs.el.
Signature
(magit-insert-branch-description)
Documentation
Insert header containing the description of the current branch.
Insert a header line with the name and description of the
current branch. The description is taken from the Git variable
branch.<NAME>.description; if that is undefined then no header
line is inserted at all.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-refs.el
(defun magit-insert-branch-description ()
"Insert header containing the description of the current branch.
Insert a header line with the name and description of the
current branch. The description is taken from the Git variable
`branch.<NAME>.description'; if that is undefined then no header
line is inserted at all."
(when-let* ((branch (magit-get-current-branch))
(desc (magit-get "branch" branch "description"))
(desc (split-string desc "\n")))
(when (equal (car (last desc)) "")
(setq desc (butlast desc)))
(magit-insert-section (branchdesc branch t)
(magit-insert-heading branch ": " (car desc))
(when (cdr desc)
(insert (string-join (cdr desc) "\n"))
(insert "\n\n")))))