Function: magit-file-line

magit-file-line is a natively compiled function defined in magit-base.el.

Signature

(magit-file-line FILE)

Documentation

Return the first line of FILE as a string.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-base.el
(defun magit-file-line (file)
  "Return the first line of FILE as a string."
  (and (file-regular-p file)
       (with-temp-buffer
         (insert-file-contents file)
         (buffer-substring-no-properties (point-min)
                                         (line-end-position)))))