Subject: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards

From: Eli Zaretskii <[email-masked]>
Date: Fri, 07 Feb 2020 11:26:54 +0200

> Cc: [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> Date: Fri, 7 Feb 2020 11:43:36 +0300
> 
> On 07.02.2020 10:57, Eli Zaretskii wrote:
> >> From: Dmitry Gutov <[email-masked]>
> >> Date: Fri, 7 Feb 2020 02:00:38 +0300
> >>
> >> I wonder how many other backends commands are broken for files like
> >> that: we basically never shell-quote file names.
> > 
> > Whenever we run commands via the shell, the prudent thing is to always
> > quote file names (and in general any argument that might include
> > wildcard characters).  One advantage of call-process is that you don't
> > have to do that.
> 
> It's not so simple. FILE already goes through call-process. But Git 
> expects a pathspec, not just a file name. So if it's a glob, it is expanded.

What I wrote was a response to your "we basically never quote".  Let
me correct my perhaps too-general response by saying "the prudent
thing is to always quote file names, unless the command expects a
wildcard in that argument".