From 9a09235a0781715461ac4cf0c3eba38e84fda15a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 6 Mar 2009 02:48:39 -0400 Subject: [PATCH] When committing a merge, use .git/MERGE_MSG If someone does a manual merge and then types 'c', Magit will now fill the log-edit buffer with the contents of .git/MERGE_MSG as a starting point. --- magit.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/magit.el b/magit.el index fc093c65..58158c15 100644 --- a/magit.el +++ b/magit.el @@ -2335,6 +2335,8 @@ Prefix arg means justify as well." '("--signoff") '()))))))) (erase-buffer) (bury-buffer) + (when (file-exists-p ".git/MERGE_MSG") + (delete-file ".git/MERGE_MSG")) (when magit-pre-log-edit-window-configuration (set-window-configuration magit-pre-log-edit-window-configuration) (setq magit-pre-log-edit-window-configuration nil)))) @@ -2367,6 +2369,8 @@ Prefix arg means justify as well." (setq magit-pre-log-edit-window-configuration (current-window-configuration)) (pop-to-buffer buf) + (when (file-exists-p ".git/MERGE_MSG") + (insert-file-contents ".git/MERGE_MSG")) (setq default-directory dir) (magit-log-edit-mode) (message "Type C-c C-c to %s (C-c C-k to cancel)." operation)))