Function: magit-file-at-point

magit-file-at-point is a byte-compiled function defined in magit-git.el.

Signature

(magit-file-at-point &optional EXPAND ASSERT)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
;;;; File Miscellaneous

(defun magit-file-at-point (&optional expand assert)
  (cond-let
    ([file (magit-section-case
             (file (oref it value))
             (hunk (magit-section-parent-value it)))]
     (if expand
         (expand-file-name file (magit-toplevel))
       file))
    (assert
     (user-error "No file at point"))))