Subject: Re: bug#73320: [PATCH] project--vc-list-files: use Git's sparse-index

From: Michael Albinus <[email-masked]>
Date: Fri, 04 Oct 2024 09:48:53 +0200

Dmitry Gutov <[email-masked]> writes:

Hi Dmitry,

> It could use some review, though. There aren't many examples of doing
> that in Emacs code.

In Eshell, Jim Porter makes extensive use of connection-local
variables. He has also added some functions which are useful (not
applied in Tramp yet).

> Michael, could you take a look? Does this look reasonable? Should
> :application be 'tramp' or 'vc-git'?

In general, it doesn't matter. But since your change is dedicated to
vc-git, using the application `vc-git' makes sense.

However, you use with-connection-local-variables, which uses the
application `tramp' by default. Either use
with-connection-local-application-variables instead, or let-bind
connection-local-default-application to `vc-git'.

I'm not sure how setq-connection-local behaves wrt to the application
(this function was written by Jim, I've never used it). But binding
connection-local-default-application should be good enough, I believe.

> Is the 'connection-local-set-profiles' call needed here at all or can
> be skipped?

It is needed. connection-local-set-profile-variables declares only the
variables, connection-local-set-profiles activates them.

Best regards, Michael.