]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve Tramp VC cache
authorEyal Soha <eyalsoha@gmail.com>
Sat, 26 Oct 2024 12:16:26 +0000 (14:16 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Oct 2024 16:46:41 +0000 (18:46 +0200)
* 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

index 8823856f09975e3b0717d775e53b1fb6e4535b08..8703087f66d3c269f4bcc05d840826e698793ca3 100644 (file)
@@ -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.