Have files saved when finished a three-way-merge with ediff.

This commit is contained in:
David Abrahams 2010-05-06 11:21:27 +01:00 committed by Phil Jackson
parent c50fab4242
commit abba1a02e2

View file

@ -4012,9 +4012,11 @@ With prefix force the removal even it it hasn't been merged."
(buffer-C ediff-buffer-C) (buffer-C ediff-buffer-C)
(buffer-Ancestor ediff-ancestor-buffer) (buffer-Ancestor ediff-ancestor-buffer)
(file magit-ediff-file) (file magit-ediff-file)
(file-buffer)
(windows magit-ediff-windows)) (windows magit-ediff-windows))
(ediff-cleanup-mess) (ediff-cleanup-mess)
(find-file file) (find-file file)
(setq file-buffer (current-buffer))
(erase-buffer) (erase-buffer)
(insert-buffer-substring buffer-C) (insert-buffer-substring buffer-C)
(kill-buffer buffer-A) (kill-buffer buffer-A)
@ -4022,8 +4024,12 @@ With prefix force the removal even it it hasn't been merged."
(kill-buffer buffer-C) (kill-buffer buffer-C)
(when (bufferp buffer-Ancestor) (kill-buffer buffer-Ancestor)) (when (bufferp buffer-Ancestor) (kill-buffer buffer-Ancestor))
(set-window-configuration windows) (set-window-configuration windows)
(message "Conflict resolution finished; you may save the buffer"))))))) (if magit-save-some-buffers
(save-some-buffers
(eq magit-save-some-buffers 'dontask)
(lambda ()
(eq (current-buffer) file-buffer)))
(message "Conflict resolution finished; you may save the buffer"))))))))
(defun magit-interactive-resolve-item () (defun magit-interactive-resolve-item ()
(interactive) (interactive)