Function: magit-process-set-mode-line

magit-process-set-mode-line is a byte-compiled function defined in magit-process.el.

Signature

(magit-process-set-mode-line PROGRAM ARGS)

Documentation

Display the git command (sans arguments) in the mode line.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-process.el
(defun magit-process-set-mode-line (program args)
  "Display the git command (sans arguments) in the mode line."
  (when (equal program (magit-git-executable))
    (setq args (nthcdr (magit-process-git-arguments--length) args)))
  (let ((str (concat " " (propertize
                          (concat (file-name-nondirectory program)
                                  (and args (concat " " (car args))))
                          'mouse-face 'highlight
                          'keymap magit-mode-line-process-map
                          'help-echo "mouse-1: Show process buffer"
                          'font-lock-face 'magit-mode-line-process))))
    (magit-repository-local-set 'mode-line-process str)
    (dolist (buf (magit-mode-get-buffers))
      (with-current-buffer buf
        (setq mode-line-process str)))
    (force-mode-line-update t)))