Function: magit-reflog-format-subject

magit-reflog-format-subject is a byte-compiled function defined in magit-reflog.el.

Signature

(magit-reflog-format-subject SUBJECT)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-reflog.el
(defun magit-reflog-format-subject (subject)
  (let* ((match (string-match magit-reflog-subject-re subject))
         (command (and match (match-str 1 subject)))
         (option  (and match (match-str 2 subject)))
         (type    (and match (match-str 3 subject)))
         (label (if (string= command "commit")
                    (or type command)
                  command))
         (text (if (string= command "commit")
                   label
                 (string-join (delq nil (list command option type)) " "))))
    (format "%-16s "
            (magit--propertize-face
             text (or (cdr (assoc label magit-reflog-labels))
                      'magit-reflog-other)))))