From d123319e15d5ff24d3353f0d5c1b5f46c22172e2 Mon Sep 17 00:00:00 2001 From: Wolfgang Scherer Date: Thu, 6 Feb 2020 14:41:12 +0100 Subject: [PATCH] vc-git-state fails for filenames with wildcards * lisp/vc/vc-git.el (vc-git-state): file argument must be quoted to avoid wildcard expansion by shell. --- lisp/vc/vc-git.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2caa287..0314e5e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -330,7 +330,7 @@ in the order given by `git status'." ,@(when (version<= "1.7.6.3" (vc-git--program-version)) '("--ignored")) "--")) - (status (apply #'vc-git--run-command-string file args))) + (status (apply #'vc-git--run-command-string (shell-quote-argument file) args))) (if (null status) ;; If status is nil, there was an error calling git, likely because ;; the file is not in a git repo. -- 2.7.4