Make the process-connection-type customizable.
We need process-connection-type to be nil on cygwin We need process-connection-type to be t for magit to ask for password So we now use the new variable magit-process-connection-type for this, defaulting to nil on cygwin, and to t on others platform.
This commit is contained in:
parent
c256a726d4
commit
2acc8be623
1 changed files with 9 additions and 1 deletions
10
magit.el
10
magit.el
|
@ -141,6 +141,14 @@ Setting this to nil will make it do nothing, setting it to t will arrange things
|
|||
:group 'magit
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-process-connection-type (not (eq system-type 'cygwin))
|
||||
"Connection type used for the git process.
|
||||
|
||||
nil mean pipe, it is usually faster and more efficient, and work on cygwin.
|
||||
t mean pty, it enable magit to prompt for passphrase when needed."
|
||||
:group 'magit
|
||||
:type 'boolean)
|
||||
|
||||
(defface magit-header
|
||||
'((t))
|
||||
"Face for generic header lines.
|
||||
|
@ -1226,7 +1234,7 @@ FUNC should leave point at the end of the modified region"
|
|||
"\n")
|
||||
(cond (nowait
|
||||
(setq magit-process
|
||||
(let ((process-connection-type nil))
|
||||
(let ((process-connection-type magit-process-connection-type))
|
||||
(apply 'start-file-process cmd buf cmd args)))
|
||||
(set-process-sentinel magit-process 'magit-process-sentinel)
|
||||
(set-process-filter magit-process 'magit-process-filter)
|
||||
|
|
Loading…
Reference in a new issue