Subject: Re: bug#50175: 28.0.50; tramp is hooked into C-x d (vc-dir) but not C-x = (vc-doff)

From: Ola x Nilsson <[email-masked]>
Date: Thu, 26 Aug 2021 08:14:23 +0200

On Thu, Aug 26 2021, Dmitry Gutov wrote:

> Hi!
>
> On 25.08.2021 18:45, Steingold wrote:
>> Hi Ola, Lars, Dmitry,
>> 
>>> * Ola x Nilsson<[email-masked]>  [2021-08-25 15:26:34 +0200]:
>>>
>>> On Mon, Aug 23 2021, Steingold wrote:
>>>
>>>> when editing a remote file, vc-dir shows the*vc-dir*  buffer correctly,
>>>> but vc-diff in the same buffer fails:
>>>>
<snip>
>>>>
>>>> Same error on = (vc-diff) in the*vc-dir*  buffer.
>>>>
>>>> I am pretty sure this is a regression from about 2-3 weeks ago.
>>>>
>>>> (vc-next-action also fails)
>>> This is the result of the git literal pathspec prefix being added in a
>>> non-tramp-aware way.  See bug #39452.  The commits in question are
>>>
>>> 3502321403 Fix regressions in the last change
>>> 3572613550 Fix vc-git-state for filenames with wildcards
>> I do have all these patches, but, alas, I still see the bug.
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39452
>> has no messages for 10 days, I hope it is being worked on...

Sorry, I was not as clear as I should have been.  The two commits above
introduced the problem.  Reverting them made vc-git work over tramp for
me again.

> We indeed applied a patch that's been lying around for a while and keep 
> finding regressions.
>
> Now I was curious to see how we generally avoid passing remote file 
> names (in Tramp syntax) to Git and other VCS, and it turns out 
> vc-do-command, which almost all calls go though, converts all file names 
> to relative ones.
>
> Which the new literal-pathspecs approach in vc-git conflicts with. I'm 
> still not loving the idea of a dynamic variable to enable/disable the 
> use of env var (fix for the problem we/I have met with the other 
> approach), but it's becoming increasingly attractive.
>
> That said, I've just pushed a fix (commit 2b62b2a019), please see how it 
> works for you.

I did some light testing, and vc-diff and vc-annotate work for me now
with git over tramp.

-- 
Ola Nilsson