From f6439c0797c86ef560d5ec557164db07e8a5f3f9 Mon Sep 17 00:00:00 2001 From: Eyal Soha Date: Sat, 26 Oct 2024 14:16:26 +0200 Subject: [PATCH] Improve Tramp VC cache * lisp/net/tramp-sh.el (tramp-vc-file-name-handler): Add `file-directory-p', which is used in `vc-find-root'. (Bug#74026) Copyright-paperwork-exempt: yes (cherry picked from commit fb974171b44253aa0600074e9b293bdeabc8c032) --- lisp/net/tramp-sh.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8823856f099..8703087f66d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3744,10 +3744,12 @@ Fall back to normal file name handler if no Tramp handler exists." (cond ;; That's what we want: file names, for which checks are ;; applied. We assume that VC uses only `file-exists-p' - ;; and `file-readable-p' checks; otherwise we must extend - ;; the list. We do not perform any action, but return - ;; nil, in order to keep `vc-registered' running. - ((and fn (memq operation '(file-exists-p file-readable-p))) + ;; `file-readable-p' and `file-directory-p' checks; + ;; otherwise we must extend the list. We do not perform + ;; any action, but return nil, in order to keep + ;; `vc-registered' running. + ((and fn (memq operation + '(file-exists-p file-readable-p file-directory-p))) (add-to-list 'tramp-vc-registered-file-names localname 'append) nil) ;; `process-file' and `start-file-process' shall be ignored. -- 2.39.5