]> git.eshelyaron.com Git - emacs.git/commit
VC: New support for other working trees
authorSean Whitton <spwhitton@spwhitton.name>
Fri, 25 Jul 2025 18:34:04 +0000 (19:34 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Jul 2025 14:00:32 +0000 (16:00 +0200)
commite9083ef46c4474ca7938b29317d7c69c5d585f02
tree7167f0b84cdb4f5e9724171befae6489959c623d
parent18460854d83da72d3437c84b984f5c9c02bfc99c
VC: New support for other working trees

* lisp/vc/vc-git.el (vc-git--read-start-point): New function,
factored out of vc-git-create-tag.
(vc-git-create-tag): Use it.
(vc-git--worktrees, vc-git-known-other-working-trees)
(vc-git-add-working-tree, vc-git-delete-working-tree)
(vc-git-move-working-tree):
* lisp/vc/vc-hg.el (vc-hg-known-other-working-trees)
(vc-hg-add-working-tree, vc-hg--shared-p)
(vc-hg-delete-working-tree, vc-hg-move-working-tree): New
functions.
* lisp/vc/vc.el: Define API for known-other-working-tree,
add-working-tree, delete-working-tree and move-working-tree
backend functions.
(vc-dir-status-files): New function.
(project-current-directory-override): Declare.
(dired-rename-subdir): Autoload.
(vc-add-working-tree, vc-switch-working-tree)
(vc-delete-working-tree, vc-move-working-tree): New commands.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them under C-x v.

* doc/emacs/vc1-xtra.texi (Other Working Trees): New node.
* etc/NEWS: Announce the new commands.

* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): New function.
(vc-test-git07-other-working-trees)
(vc-test-hg07-other-working-trees): New tests.

* lisp/ldefs-boot.el: Regenerate.

(cherry picked from commit 50ffb29d0bbb92a7c6569c83d2e3e4868c4e867b)
doc/emacs/emacs.texi
doc/emacs/vc1-xtra.texi
etc/NEWS
lisp/vc/vc-dir.el
lisp/vc/vc-git.el
lisp/vc/vc-hg.el
lisp/vc/vc-hooks.el
lisp/vc/vc.el
test/lisp/vc/vc-tests/vc-tests.el