bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50572: 28.0.50; [PATCH] fix VC to find the responsible backend with


From: Manuel Giraud
Subject: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible backend with the most specific path.
Date: Fri, 12 Nov 2021 10:51:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix)

Lars Ingebrigtsen <larsi@gnus.org> writes:

[...]

> It's pushed to the trunk now -- can you adjust the patch to use that
> instead?

There you go.
>From 2e4e651b722673439be2654c7aae4202e8e73cd4 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Fri, 12 Nov 2021 10:46:56 +0100
Subject: [PATCH] Find most specific backend for `vc-backend-for-registration'.

---
 lisp/vc/vc.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 4b56f1b795..b8f0425393 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -945,7 +945,7 @@ vc-backend-for-registration
       (dolist (backend vc-handled-backends)
         (when (not (vc-call-backend backend 'registered file))
           (let* ((path (vc-call-backend backend 'responsible-p file))
-                 (len (length path)))
+                 (len (and path (length (file-name-split path)))))
             (when (and len (> len max))
               (setq max len bk backend)))))
       (when bk
-- 
2.33.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]