From 909c793cf2409aa278f4609b3fca2681beb9e8a4 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Thu, 21 Aug 2008 02:34:05 +0300 Subject: [PATCH] Add finished indication to process buffer. * magit.el (magit-process-sentinel): Simplified. Add event to process buffer. --- magit.el | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/magit.el b/magit.el index c89f573c..1c121128 100644 --- a/magit.el +++ b/magit.el @@ -393,18 +393,11 @@ Many Magit faces inherit from this one by default." (revert-buffer t t t)))))))) (defun magit-process-sentinel (process event) - (cond ((string= event "finished\n") - (message "Git finished.") - (setq magit-process nil)) - ((string= event "killed\n") - (message "Git was killed.") - (setq magit-process nil)) - ((string-match "exited abnormally" event) - (message "Git failed.") - (setq magit-process nil) - (magit-display-process)) - (t - (message "Git is weird."))) + (with-current-buffer (process-buffer process) + (let ((msg (format "Git %s." (substring event 0 -1)))) + (insert msg "\n") + (message msg))) + (setq magit-process nil) (magit-set-mode-line-process nil) (magit-revert-files) (magit-update-status (magit-find-status-buffer)))