From: Dmitry Gutov Date: Sun, 5 May 2024 17:19:48 +0000 (+0300) Subject: project--vc-list-files: Use vc-git-command for better error reporting X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3509e2c78f32021d3ce2143314ac6469daf736fe;p=emacs.git project--vc-list-files: Use vc-git-command for better error reporting * lisp/progmodes/project.el (project--vc-list-files): Use 'vc-git-command' for better error reporting (https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00399.html). (cherry picked from commit 8d3e4e823f21d5a70f7e6c51e161b2322f1bccc3) --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index c647a542a92..c89f7216375 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -643,7 +643,7 @@ See `project-vc-extra-root-markers' for the marker value format.") (list (project-root project))))) (declare-function vc-git--program-version "vc-git") -(declare-function vc-git--run-command-string "vc-git") +(declare-function vc-git-command "vc-git") (declare-function vc-hg-command "vc-hg") (defun project--vc-list-files (dir backend extra-ignores) @@ -696,7 +696,8 @@ See `project-vc-extra-root-markers' for the marker value format.") file (concat default-directory file)))) (split-string - (apply #'vc-git--run-command-string nil "ls-files" args) + (with-output-to-string + (apply #'vc-git-command standard-output 0 nil "ls-files" args)) "\0" t)))) (when (project--vc-merge-submodules-p default-directory) ;; Unfortunately, 'ls-files --recurse-submodules' conflicts with '-o'.