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

From: Stephen Berman <[email-masked]>
Date: Fri, 27 Aug 2021 21:57:06 +0200

On Fri, 27 Aug 2021 20:10:13 +0300 Juri Linkov <[email-masked]> wrote:

>>> - (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv"
>>> "-f" "--"))
>>> +  (vc-git-command nil 0 (list old new) "mv" "-f" "--"))
>>
>> Looks like the proper fix, thanks. Feel free to push it right away, if
>> you like.
>
> Pushed now.
>
> I wonder how many git commands still remain broken
> and will go unnoticed to the release?  Such as
> vc-git-delete-file and vc-git-mark-resolved, etc.
>
>> Would be great to add some test, though. vc-tests.el currently doesn't
>> exercise vc-rename-file at all.
>
> Indeed, covering all git commands will avoid the danger of breaking
> some commands.

I just discovered that some code I have that uses vc-print-log-internal
broke after the literal-pathspecs change; specifically, my code passes a
directory name beginning with "~/" to vc-print-log-internal, and this
had worked fine till that change, which broke it, and I found I have to
wrap the directory name in expand-file-name to make the code work again.
Is this expected fallout from that change or was I perhaps misusing
vc-print-log-internal and was just lucky that it had worked before?

Steve Berman