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

From: Dmitry Gutov <[email-masked]>
Date: Sun, 29 Aug 2021 01:19:21 +0300

On 28.08.2021 18:48, Lars Ingebrigtsen wrote:
> Stephen Berman <[email-masked]> writes:
> 
>> But I don't see at first glance why the unexpanded file name
>> in the latter worked prior to the literal-pathspecs change but not
>> afterwards.
> 
> Isn't that what that change does -- make git interpret paths literally?
> (So that you can have file names like "~" and "*" in your repo.)

Yes and no: Git never received file names starting with "~" anyway - 
because vc-do-command converted all file names to relative ones.

But a file name starting with ":(literal)..." is not something 
recognized by Emacs, so file-relative-name doesn't work anymore.

If instead of altering file names we switch to the --literal-pathnames 
argument, this problem should go away. But we will return to the 
original concern that "the way git implements it, which
is by setting an environment variable: it affects all subprocesses git
calls, including git-hook scripts which tends to trip people up" 
(quoting Noam).