aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2023-04-11 22:59:45 +0300
committerDmitry Gutov2023-04-11 22:59:45 +0300
commite9fef1d70ff6b5ed48681e6a1c62e650b108cd55 (patch)
treef751efb888107d13bfa441fd744f0b98ba20d1dc
parent372e024accd9b6e96c2dd92f89451192fb06b509 (diff)
downloademacs-e9fef1d70ff6b5ed48681e6a1c62e650b108cd55.tar.gz
emacs-e9fef1d70ff6b5ed48681e6a1c62e650b108cd55.zip
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).
-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'."
1594 (vc-call make-version-backups-p file) 1594 (vc-call make-version-backups-p file)
1595 (vc-up-to-date-p file) 1595 (vc-up-to-date-p file)
1596 (vc-make-version-backup file)) 1596 (vc-make-version-backup file))
1597 (let ((backend (vc-backend file))) 1597 (let ((backend (or vc-dir-backend (vc-backend file))))
1598 (with-vc-properties (list file) 1598 (with-vc-properties (list file)
1599 (condition-case err 1599 (condition-case err
1600 (vc-call-backend backend 'checkout file rev) 1600 (vc-call-backend backend 'checkout file rev)