poject--vc-list-files: Check that the current Emacs is 31+

* lisp/progmodes/project.el (project--vc-list-files):
Check that the current Emacs is 31+, to avoid breakage on remote
hosts with older Git (bug#73320).
This commit is contained in:
Dmitry Gutov 2024-10-08 02:47:15 +03:00
parent 7cd8108098
commit 70d064dab7

View file

@ -674,7 +674,8 @@ See `project-vc-extra-root-markers' for the marker value format.")
(submodules (project--git-submodules))
files)
(setq args (append args
(and (version<= "2.35" (vc-git--program-version))
(and (<= 31 emacs-major-version)
(version<= "2.35" (vc-git--program-version))
'("--sparse"))
(and include-untracked '("-o"))))
(when extra-ignores