1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

vc-test--other-working-trees: Fix a skip condition

* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): For Git, don't try moving the
first working tree unless we have Git>=2.29.
This commit is contained in:
Sean Whitton 2025-08-12 14:36:15 +01:00
parent 81aa814e59
commit 2923d244a3

View file

@ -744,22 +744,22 @@ This checks also `vc-backend' and `vc-responsible-backend'."
(should (file-directory-p third))
;; Moving the first working tree is only supported
;; for some backends.
(cl-ecase backend
(Git
(let ((default-directory third))
(vc-move-working-tree backend first second))
(let ((default-directory third))
(should
(equal (list second)
(vc-call-backend backend
'known-other-working-trees))))
(should-not (file-directory-p first))
(should (file-directory-p second))
(vc-move-working-tree backend second first))
(Hg
(let ((default-directory third))
(should-error (vc-move-working-tree backend
first second)))))
(cond ((and (eq backend 'Git)
(version<= "2.29" (vc-git--program-version)))
(let ((default-directory third))
(vc-move-working-tree backend first second))
(let ((default-directory third))
(should
(equal (list second)
(vc-call-backend backend
'known-other-working-trees))))
(should-not (file-directory-p first))
(should (file-directory-p second))
(vc-move-working-tree backend second first))
((eq backend 'Hg)
(let ((default-directory third))
(should-error (vc-move-working-tree backend
first second)))))
(vc-move-working-tree backend third second)
;; Test `delete-working-tree'.