summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2023-04-11 22:59:45 +0300
committerDmitry Gutov <dgutov@yandex.ru>2023-04-11 22:59:45 +0300
commite9fef1d70ff6b5ed48681e6a1c62e650b108cd55 (patch)
treef751efb888107d13bfa441fd744f0b98ba20d1dc /lisp
parent372e024accd9b6e96c2dd92f89451192fb06b509 (diff)
downloademacs-e9fef1d70ff6b5ed48681e6a1c62e650b108cd55.tar.gz
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).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/vc/vc.el2
1 files changed, 1 insertions, 1 deletions
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)