Function: magit-run-git-gui-blame

magit-run-git-gui-blame is an autoloaded, interactive and byte-compiled function defined in magit-extras.el.

Signature

(magit-run-git-gui-blame COMMIT FILENAME &optional LINENUM)

Documentation

Run git gui blame on the given FILENAME and COMMIT.

Interactively run it for the current file and the HEAD, with a prefix or when the current file cannot be determined let the user choose. When the current buffer is visiting FILENAME instruct blame to center around the line point is on.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-extras.el
;;;; Git-Gui

;;;###autoload
(defun magit-run-git-gui-blame (commit filename &optional linenum)
  "Run `git gui blame' on the given FILENAME and COMMIT.
Interactively run it for the current file and the `HEAD', with a
prefix or when the current file cannot be determined let the user
choose.  When the current buffer is visiting FILENAME instruct
blame to center around the line point is on."
  (interactive
    (let (revision filename)
      (when (or current-prefix-arg
                (progn
                  (setq revision "HEAD")
                  (not (setq filename (magit-file-relative-name nil 'tracked)))))
        (setq revision (magit-read-branch-or-commit "Blame from revision"))
        (setq filename (magit-read-file-from-rev revision "Blame file")))
      (list revision filename
            (and (equal filename
                        (ignore-errors
                          (magit-file-relative-name buffer-file-name)))
                 (line-number-at-pos)))))
  (magit-with-toplevel
    (magit-process-git 0 "gui" "blame"
                       (and linenum (list (format "--line=%d" linenum)))
                       commit
                       filename)))