Have files saved when finished a three-way-merge with ediff.
This commit is contained in:
parent
c50fab4242
commit
abba1a02e2
1 changed files with 8 additions and 2 deletions
10
magit.el
10
magit.el
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue