Function: magit-blob-previous

magit-blob-previous is an interactive and byte-compiled function defined in magit-files.el.

Signature

(magit-blob-previous)

Documentation

Visit the previous blob which modified the current file.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-files.el
(transient-define-suffix magit-blob-previous ()
  "Visit the previous blob which modified the current file."
  :inapt-if-not (##and$ (magit-buffer-file-name)
                        (magit-blob-ancestor (magit-buffer-revision) $))
  (interactive)
  (cond-let
    [[rev  (or magit-buffer-revision "{worktree}")]
     [file (magit-buffer-file-name)]]
    ((not file)
     (user-error "Buffer isn't visiting a file or blob"))
    ([prev (magit-blob-ancestor rev file)]
     (apply #'magit-blob-visit prev))
    ((user-error "You have reached the beginning of time"))))