Function: magit-blob-visit-file

magit-blob-visit-file is an interactive and natively compiled function defined in magit-files.el.

Signature

(magit-blob-visit-file)

Documentation

View the file from the worktree corresponding to the current blob.

When visiting a blob or the version from the index, then go to the same location in the respective file in the working tree.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-files.el
;;;###autoload
(defun magit-blob-visit-file ()
  "View the file from the worktree corresponding to the current blob.
When visiting a blob or the version from the index, then go to
the same location in the respective file in the working tree."
  (interactive)
  (if-let ((file (magit-file-relative-name)))
      (pop-to-buffer-same-window (magit-find-file-noselect "{worktree}" file))
    (user-error "Not visiting a blob")))