From fd8969fe27fc2757a22ec5ae7013e088ad4f2015 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 11:46:25 +0200 Subject: [PATCH] Fix sorting of backends in vc-responsible-backend * 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 39a5be6654b..05109256bd1 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -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) -- 2.39.2