GNU bug report logs -
#39452
[PATCH] vc-git-state fails for filenames with wildcards
Previous Next
Reported by: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>
Date: Thu, 6 Feb 2020 14:00:02 UTC
Severity: normal
Tags: patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
When a filename contains shell wildcard characters matching one or more files, e.g. `test[56].xx` matching both `test5.xx` and `test6.xx`:
-rw-r--r-- 1 ws ws 0 Feb 6 08:51 test[56].xx
-rw-r--r-- 1 ws ws 0 Feb 6 08:51 test5.xx
-rw-r--r-- 1 ws ws 0 Feb 6 08:51 test6.xx
The command `vc-git-state` does not work correctly.
The attched patch fixes this:
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.
[0001-vc-git-state-fails-for-filenames-with-wildcards.patch (text/x-patch, attachment)]
This bug report was last modified 3 years and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.