]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix sorting of backends in vc-responsible-backend
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 16 Sep 2022 09:46:25 +0000 (11:46 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 16 Sep 2022 09:46:25 +0000 (11:46 +0200)
* lisp/vc/vc.el (vc-responsible-backend): When comparing directory
names, expand them first so that we get consistent sorting of ~/
etc (bug#57777).

lisp/vc/vc.el

index 39a5be6654bdc056316a438311e12ce69ffea343..05109256bd13d0c7cfc63186dc175e3b20d6a7fe 100644 (file)
@@ -1014,7 +1014,7 @@ responsible for the given file."
                           (lambda (backend)
                             (when-let ((dir (vc-call-backend
                                              backend 'responsible-p file)))
-                              (cons backend dir)))
+                              (cons backend (expand-file-name dir))))
                           vc-handled-backends))))
         ;; Just a single response (or none); use it.
         (if (< (length dirs) 2)