Add finished indication to process buffer.

* magit.el (magit-process-sentinel): Simplified.  Add event to process buffer.
This commit is contained in:
Marius Vollmer 2008-08-21 02:34:05 +03:00
parent d4aacdbd73
commit 909c793cf2

View file

@ -393,18 +393,11 @@ Many Magit faces inherit from this one by default."
(revert-buffer t t t)))))))) (revert-buffer t t t))))))))
(defun magit-process-sentinel (process event) (defun magit-process-sentinel (process event)
(cond ((string= event "finished\n") (with-current-buffer (process-buffer process)
(message "Git finished.") (let ((msg (format "Git %s." (substring event 0 -1))))
(setq magit-process nil)) (insert msg "\n")
((string= event "killed\n") (message msg)))
(message "Git was killed.") (setq magit-process nil)
(setq magit-process nil))
((string-match "exited abnormally" event)
(message "Git failed.")
(setq magit-process nil)
(magit-display-process))
(t
(message "Git is weird.")))
(magit-set-mode-line-process nil) (magit-set-mode-line-process nil)
(magit-revert-files) (magit-revert-files)
(magit-update-status (magit-find-status-buffer))) (magit-update-status (magit-find-status-buffer)))