From 3509e2c78f32021d3ce2143314ac6469daf736fe Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 5 May 2024 20:19:48 +0300 Subject: [PATCH] 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) --- lisp/progmodes/project.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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'. -- 2.39.5