Function: magit-git-version-assert
magit-git-version-assert is a natively compiled function defined in
magit-git.el.
Signature
(magit-git-version-assert &optional MINIMAL WHO)
Documentation
Assert that the used Git version is greater than or equal to MINIMAL.
If optional MINIMAL is nil, compare with magit--minimal-git
instead. Optional WHO if non-nil specifies what functionality
needs at least MINIMAL, otherwise it defaults to "Magit".
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-git.el
(defun magit-git-version-assert (&optional minimal who)
"Assert that the used Git version is greater than or equal to MINIMAL.
If optional MINIMAL is nil, compare with `magit--minimal-git'
instead. Optional WHO if non-nil specifies what functionality
needs at least MINIMAL, otherwise it defaults to \"Magit\"."
(when (magit-git-version< (or minimal magit--minimal-git))
(let* ((host (file-remote-p default-directory))
(msg (format-spec
(cond (host "\
%w requires Git %m or greater, but on %h the version is %v.
If multiple Git versions are installed on the host, then the
problem might be that TRAMP uses the wrong executable.
Check the value of `magit-remote-git-executable' and consult
the info node `(tramp)Remote programs'.\n")
(t "\
%w requires Git %m or greater, but you are using %v.
If you have multiple Git versions installed, then check the
values of `magit-remote-git-executable' and `exec-path'.\n"))
`((?w . ,(or who "Magit"))
(?m . ,(or minimal magit--minimal-git))
(?v . ,(magit-git-version))
(?h . ,host)))))
(display-warning 'magit msg :error))))