Be robust against the *magit-process* buffer getting killed.

* magit.el (magit-run*): Only consider Git to be running when
the *magit-process* buffer still exists.
This commit is contained in:
Marius Vollmer 2009-06-06 19:50:16 +03:00
parent a76f44c1d8
commit 98e2b50a52

View file

@ -931,13 +931,14 @@ Many Magit faces inherit from this one by default."
(defun magit-run* (cmd-and-args
&optional logline noerase noerror nowait input)
(if (and magit-process
(get-buffer "*magit-process*"))
(error "Git is already running."))
(let ((cmd (car cmd-and-args))
(args (cdr cmd-and-args))
(dir default-directory)
(buf (get-buffer-create "*magit-process*"))
(successp nil))
(or (not magit-process)
(error "Git is already running."))
(magit-set-mode-line-process
(magit-process-indicator-from-command cmd-and-args))
(setq magit-process-client-buffer (current-buffer))