emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 e9fef1d70ff: vc-checkout: Try to use the vc-dir's backend first


From: Dmitry Gutov
Subject: emacs-29 e9fef1d70ff: vc-checkout: Try to use the vc-dir's backend first
Date: Tue, 11 Apr 2023 16:59:38 -0400 (EDT)

branch: emacs-29
commit e9fef1d70ff6b5ed48681e6a1c62e650b108cd55
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    vc-checkout: Try to use the vc-dir's backend first
    
    * lisp/vc/vc.el (vc-checkout): Try to use the vc-dir's backend
    before looking for the file's one.  The latter doesn't work when
    the file doesn't exist on disk yet (bug#62674).
---
 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 0e3519e2e5c..de1e38a0ef9 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1594,7 +1594,7 @@ After check-out, runs the normal hook `vc-checkout-hook'."
        (vc-call make-version-backups-p file)
        (vc-up-to-date-p file)
        (vc-make-version-backup file))
-  (let ((backend (vc-backend file)))
+  (let ((backend (or vc-dir-backend (vc-backend file))))
     (with-vc-properties (list file)
       (condition-case err
           (vc-call-backend backend 'checkout file rev)



reply via email to

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