Function: magit-find-file

magit-find-file is an autoloaded, interactive and byte-compiled function defined in magit-files.el.

Signature

(magit-find-file REV FILE)

Documentation

View FILE from REV.

Switch to a buffer visiting blob REV:FILE, creating one if none already exists. If prior to calling this command the current buffer and/or cursor position is about the same file, then go to the line and column corresponding to that location.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-files.el
;;;###autoload
(defun magit-find-file (rev file)
  "View FILE from REV.
Switch to a buffer visiting blob REV:FILE, creating one if none
already exists.  If prior to calling this command the current
buffer and/or cursor position is about the same file, then go
to the line and column corresponding to that location."
  (interactive (magit-find-file-read-args "Find file"))
  (pop-to-buffer-same-window (magit-find-file-noselect rev file)))