Function: magit-file-at-point
magit-file-at-point is a natively compiled function defined in
magit-git.el.
Signature
(magit-file-at-point &optional EXPAND ASSERT)
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/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"))))