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))))))))
(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)))