]> git.eshelyaron.com Git - emacs.git/commit
VC: New hook to strip CVS template lines when committing
authorChristoph Badura <bad@bsd.de>
Sun, 26 Jan 2025 21:48:11 +0000 (22:48 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Mar 2025 10:30:46 +0000 (11:30 +0100)
commitd7c24947ddecbe3cdd2d88af620cff7996ea592d
tree2976e36cb59dc0fdf7475ea617b1d3ec0001a3da
parent043cb26f4af425cf1f6a4f6221e4d6e06f0c0139
VC: New hook to strip CVS template lines when committing

Add a hook function to strip all lines beginning with "CVS:" from the
commit message as CVS does.  Do this only if 'log-edit-vc-backend' is
'CVS'.  (Bug#72341)

* lisp/vc/log-edit.el
(log-edit-done-strip-cvs-lines): New command.
(log-edit-done-hook): Add it as an option.

* test/lisp/vc/log-edit-tests.el
(log-edit-done-strip-cvs-lines-helper): New function.
(log-edit-done-strip-cvs-lines-cvs)
(log-edit-done-strip-cvs-lines-non-cvs)
(log-edit-done-strip-cvs-lines-only-cvs-colon-blank)
(log-edit-done-strip-cvs-lines-only-cvs-colon): New test cases.

* etc/NEWS: Mention log-edit-done-strip-cvs-lines.

(cherry picked from commit 00e284fc52b44fc3cb435a5d17ce58af1b753a34)
lisp/vc/log-edit.el
test/lisp/vc/log-edit-tests.el