Function: magit-insert-error-header

magit-insert-error-header is a byte-compiled function defined in magit-status.el.

Signature

(magit-insert-error-header)

Documentation

Insert the message about the Git error that just occurred.

This function is only aware of the last error that occur when Git was run for side-effects. If, for example, an error occurs while generating a diff, then that error won't be inserted. Refreshing the status buffer causes this section to disappear again.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260822.1158/magit-status.el
(defun magit-insert-error-header ()
  "Insert the message about the Git error that just occurred.

This function is only aware of the last error that occur when Git
was run for side-effects.  If, for example, an error occurs while
generating a diff, then that error won't be inserted.  Refreshing
the status buffer causes this section to disappear again."
  (when magit-this-error
    (magit-insert-section (error 'git)
      (insert (propertize (format "%-10s" "GitError! ")
                          'font-lock-face 'magit-section-heading))
      (insert (propertize magit-this-error 'font-lock-face 'error))
      (when magit-show-process-buffer-hint
        (insert (substitute-command-keys
                 "  [Type \\[magit-process-buffer] for details]")))
      (insert ?\n))
    (setq magit-this-error nil)))