Skip to content

Commit

Permalink
Make the process-connection-type customizable.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vanicat authored and philjackson committed May 5, 2010
1 parent c256a72 commit 2acc8be
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2acc8be

Please sign in to comment.