emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 6067f0c: Shell-quote wildcards when invoking 'vc-


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 6067f0c: Shell-quote wildcards when invoking 'vc-git-grep'
Date: Tue, 28 Nov 2017 12:48:54 -0500 (EST)

branch: emacs-26
commit 6067f0c702e3652a9d489852752f038320cb91ae
Author: Robert Pluim <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Shell-quote wildcards when invoking 'vc-git-grep'
    
    * lisp/vc/vc-git.el (vc-git-grep): Apply shell quoting to
    filename wildcards to ensure globbing is done by git rather
    than the shell.  (Bug#29303)
---
 lisp/vc/vc-git.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 6b6f0f8..8b18c0a 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1430,7 +1430,9 @@ This command shares argument histories with \\[rgrep] and 
\\[grep]."
                                   nil nil 'grep-history)
             nil))
       (t (let* ((regexp (grep-read-regexp))
-               (files (grep-read-files regexp))
+               (files
+                 (mapconcat #'shell-quote-argument
+                            (split-string (grep-read-files regexp)) " "))
                (dir (read-directory-name "In directory: "
                                          nil default-directory t)))
           (list regexp files dir))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]