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

Make marking conflicted files as resolved upon saving opt-out

This fixes Bug#3860.

* lisp/vc/vc.el (vc-resolve-conflicts): New user option.
* lisp/vc/vc-bzr.el (vc-bzr-resolve-conflicts): New user option.
(vc-bzr-find-file-hook): Use it.
* lisp/vc/vc-hg.el (vc-hg-resolve-conflicts): New user option.
(vc-hg-find-file-hook): Use it.
* lisp/vc/vc-svn.el (vc-svn-resolve-conflicts): New user option.
(vc-svn-find-file-hook): Use it.
* lisp/vc/vc-git.el (vc-git-resolve-conflicts): Support
'default' as an option.  Adjust docstring and version.
(vc-git-find-file-hook): Respect vc-resolve-conflicts.
* etc/NEWS: Announce the new options.
This commit is contained in:
Mauro Aranda 2025-03-17 06:55:07 -03:00
parent 86be9431ae
commit acb96a5ca8
6 changed files with 84 additions and 9 deletions

View file

@ -999,6 +999,21 @@ the URL-REGEXP of the association."
:value-type ,vc-cloneable-backends-custom-type)
:version "31.1")
(defcustom vc-resolve-conflicts t
"Whether to mark conflicted file as resolved upon saving.
If this is non-nil and there are no more conflict markers in the file,
VC will mark the conflicts in the saved file as resolved. This is
only meaningful for VCS that handle conflicts by inserting conflict
markers in a conflicted file.
When saving a conflicted file, VC first tries to use the value
of `vc-BACKEND-resolve-conflicts', for handling backend-specific
settings. It defaults to this option if that option has the special
value `default'."
:type 'boolean
:version "31.1")
;; File property caching