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.
---
 magit.el |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/magit.el b/magit.el
index 203a365..801a303 100644
--- a/magit.el
+++ b/magit.el
@@ -133,6 +133,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.
@@ -1218,7 +1226,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)
-- 
1.7.1

Reply via email to