diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index af875e89907f..368c89fb2557 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -964,9 +964,10 @@ vc-responsible-backend (catch 'found ;; First try: find a responsible backend. If this is for registration, ;; it must be a backend under which FILE is not yet registered. - (dolist (backend vc-handled-backends) - (and (vc-call-backend backend 'responsible-p file) - (throw 'found backend)))) + (dolist (file-path (list file (file-truename file))) + (dolist (backend vc-handled-backends) + (and (vc-call-backend backend 'responsible-p file-path) + (throw 'found backend))))) (error "No VC backend is responsible for %s" file))) (defun vc-expand-dirs (file-or-dir-list backend)