Function: magit-dired-log

magit-dired-log is an autoloaded, interactive and byte-compiled function defined in magit-dired.el.

Signature

(magit-dired-log &optional FOLLOW)

Documentation

In Dired, show log for all marked files or the directory if none are marked.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-dired.el
;;;###autoload
(defun magit-dired-log (&optional follow)
  "In Dired, show log for all marked files or the directory if none are marked."
  (interactive "P")
  (if-let ((topdir (magit-toplevel default-directory)))
      (let ((args (car (magit-log-arguments)))
            (files (or (dired-get-marked-files nil 'marked)
                       (list default-directory))))
        (when (and follow
                   (not (member "--follow" args))
                   (not (cdr files)))
          (push "--follow" args))
        (magit-log-setup-buffer
         (list (or (magit-get-current-branch) "HEAD"))
         args
         (let ((default-directory topdir))
           (mapcar #'file-relative-name files))
         magit-log-buffer-file-locked))
    (magit--not-inside-repository-error)))