X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Femacs%2Fgit.el;h=972c402ea0e79405ef7123dcdf748eccf9e6f3f7;hb=e8b4029f990907e24fac0e7772ee19ee6dd55c1c;hp=08d6404bcbafced3c1a3ade06355865ae75a0f33;hpb=b8ee51815ad0520b0340c2a594dee1f8de9c7c8a;p=git.git diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el index 08d6404bc..972c402ea 100644 --- a/contrib/emacs/git.el +++ b/contrib/emacs/git.el @@ -589,6 +589,7 @@ and returns the process output as a string." (let ((commit (git-commit-tree buffer tree head))) (git-update-ref "HEAD" commit head) (condition-case nil (delete-file ".git/MERGE_HEAD") (error nil)) + (condition-case nil (delete-file ".git/MERGE_MSG") (error nil)) (with-current-buffer buffer (erase-buffer)) (git-set-files-state files 'uptodate) (when (file-directory-p ".git/rr-cache") @@ -888,7 +889,7 @@ and returns the process output as a string." 'face 'git-header-face) (propertize git-log-msg-separator 'face 'git-separator-face) "\n") - (cond ((and merge-heads (file-readable-p ".git/MERGE_MSG")) + (cond ((file-readable-p ".git/MERGE_MSG") (insert-file-contents ".git/MERGE_MSG")) (sign-off (insert (format "\n\nSigned-off-by: %s <%s>\n" @@ -899,7 +900,8 @@ and returns the process output as a string." (2 font-lock-function-name-face)) (,(concat "^\\(" (regexp-quote git-log-msg-separator) "\\)$") (1 font-lock-comment-face))))) - (log-edit #'git-do-commit nil #'git-log-edit-files buffer)))) + (log-edit #'git-do-commit nil #'git-log-edit-files buffer) + (re-search-forward (regexp-quote (concat git-log-msg-separator "\n")) nil t)))) (defun git-find-file () "Visit the current file in its own buffer."