From c55f27dadd173d795516f8ccfd2b7b092a5eafa6 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 6 Aug 2008 04:18:41 +0300 Subject: [PATCH] Show merge heads in status and don't insert MERGE_MSG in log-edit buffer. --- magit.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/magit.el b/magit.el index 84f41ab3..76b31d07 100644 --- a/magit.el +++ b/magit.el @@ -99,6 +99,9 @@ (magit-get-top-dir (read-directory-name "Git repository: " dir)) dir))) +(defun magit-name-rev (rev) + (magit-shell "git name-rev --always --name-only %s" rev)) + (defun magit-insert-output (title washer cmd &rest args) (if title (insert (propertize title 'face 'bold) "\n")) @@ -255,6 +258,12 @@ (insert (format "Local: %s %s\n" (propertize (or branch "(detached)") 'face 'bold) (abbreviate-file-name default-directory))) + (let ((merge-heads (magit-file-lines ".git/MERGE_HEAD"))) + (if merge-heads + (insert (format "Merging: %s\n" + (magit-concat-with-delim + ", " + (mapcar 'magit-name-rev merge-heads)))))) (insert "\n") (magit-insert-output "Untracked files:" 'magit-wash-other-files "git" "ls-files" "--others" "--exclude-standard") @@ -428,16 +437,12 @@ (interactive) (let ((dir default-directory) (buf (get-buffer-create "*git-log-edit*"))) - (setq magit-pre-log-edit-window-configuration (current-window-configuration)) + (setq magit-pre-log-edit-window-configuration + (current-window-configuration)) (pop-to-buffer buf) (setq default-directory dir) (use-local-map magit-log-edit-map) - (save-excursion - (magit-log-edit-cleanup) - (if (and (= (buffer-size) 0) - (file-exists-p ".git/MERGE_MSG")) - (insert-file-contents ".git/MERGE_MSG"))) - (message "Use C-c C-c when done."))) + (message "Type C-c C-c to commit."))) ;;; Miscellaneous