Only start the server if it isn't running
magit's interactive rebase feature tries to start the server even if it is already running. If it is already running then Emacs asks whether or not it should destroy existing clients. This is fatal if the frame magit is running in was created by emacsclient itself (e.g. Emacs is running in the background with "--daemon"), so the user has to answer "no". This question can be avoided if the server is only startet if it isn't already running.
This commit is contained in:
parent
b09375ebe2
commit
8175d6dfad
1 changed files with 2 additions and 1 deletions
3
magit.el
3
magit.el
|
@ -3532,7 +3532,8 @@ Prefix arg means justify as well."
|
||||||
(defun magit-interactive-rebase ()
|
(defun magit-interactive-rebase ()
|
||||||
"Start a git rebase -i session, old school-style."
|
"Start a git rebase -i session, old school-style."
|
||||||
(interactive)
|
(interactive)
|
||||||
(server-start)
|
(unless (server-running-p)
|
||||||
|
(server-start))
|
||||||
(let* ((section (get-text-property (point) 'magit-section))
|
(let* ((section (get-text-property (point) 'magit-section))
|
||||||
(commit (and (member 'commit (magit-section-context-type section))
|
(commit (and (member 'commit (magit-section-context-type section))
|
||||||
(magit-section-info section)))
|
(magit-section-info section)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue