project--vc-list-files: Use '--sparse' with 'git ls-files'
When dealing with exceptionally large Git repositories, the
performance of `project-find-file` can suffer dramatically as
the list of files is collected for completion. This adds insult
to injury when you consider cases where the developer has
configured the repository to use a sparse checkout where the
vast majority of these files are not even present on disk and
are not valid candidates for completion.
* lisp/progmodes/project.el (project--vc-list-files):
Pass 'sparse' to 'git ls-files' when Git is recent enough.
Filter out file names that end with '/' (bug#73320).
(cherry picked from commit
8d9a4647fbc6c57e82045ecd2b3f157ece399e9e)