Yes, I imagine that it was once correct and no longer. To help prevent this issue in the future, Tramp could print a message whenever the handler is installed yet commands other than the ones in the list get run. Thanks for the help! I have closed the PR on GitHub. Eyal On Sat, Oct 26, 2024, 06:22 Michael Albinus wrote: > Version: 30.2 > > Eyal Soha writes: > > Hi Eyal, > > > The comment here is not correct: > > > https://github.com/emacs-mirror/emacs/blob/2a6af880b0958d527a4d32005ef9acf3bc4ea030/lisp/net/tramp-sh.el#L3736-L3740 > > The comment was correct. Meanwhile, vc-find-root has been added or > extended, we need file-directorx-p therefore. > > > The command file-directory-p should also be cached. Fortunately, the > > result is already cached so all that is needed is to add this function > > to the list. Performance of the ssh commands for vc-register is > > improved by 170% with this patch. > > > > It's described in detail here: > > https://github.com/emacs-mirror/emacs/pull/43 > > > > How can I help get this patch into the repository? > > Thanks for your comprehensive investigation. I've tried your changes, > Tramp's regression tests still pass. > > So I have pushed it to the repositories. Will appear end of this month > with Tramp 2.7.1.4 on GNU ELPA. Closing the bug. > > > Eyal > > Best regards, Michael. >