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.
This commit is contained in:
parent
0d897e61c4
commit
9a09235a07
1 changed files with 4 additions and 0 deletions
4
magit.el
4
magit.el
|
@ -2335,6 +2335,8 @@ Prefix arg means justify as well."
|
||||||
'("--signoff") '())))))))
|
'("--signoff") '())))))))
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(bury-buffer)
|
(bury-buffer)
|
||||||
|
(when (file-exists-p ".git/MERGE_MSG")
|
||||||
|
(delete-file ".git/MERGE_MSG"))
|
||||||
(when magit-pre-log-edit-window-configuration
|
(when magit-pre-log-edit-window-configuration
|
||||||
(set-window-configuration magit-pre-log-edit-window-configuration)
|
(set-window-configuration magit-pre-log-edit-window-configuration)
|
||||||
(setq magit-pre-log-edit-window-configuration nil))))
|
(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
|
(setq magit-pre-log-edit-window-configuration
|
||||||
(current-window-configuration))
|
(current-window-configuration))
|
||||||
(pop-to-buffer buf)
|
(pop-to-buffer buf)
|
||||||
|
(when (file-exists-p ".git/MERGE_MSG")
|
||||||
|
(insert-file-contents ".git/MERGE_MSG"))
|
||||||
(setq default-directory dir)
|
(setq default-directory dir)
|
||||||
(magit-log-edit-mode)
|
(magit-log-edit-mode)
|
||||||
(message "Type C-c C-c to %s (C-c C-k to cancel)." operation)))
|
(message "Type C-c C-c to %s (C-c C-k to cancel)." operation)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue