From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 09:46:25 +0000 (+0200) Subject: Fix sorting of backends in vc-responsible-backend X-Git-Tag: emacs-29.0.90~1856^2~462 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fd8969fe27fc2757a22ec5ae7013e088ad4f2015;p=emacs.git 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). --- 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)