From 2acc8be62357015205123fa7f1a7b4e9f3ef3891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Sat, 20 Mar 2010 08:23:22 +0100 Subject: [PATCH] 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. --- magit.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 0743cdb3..799e43ff 100644 --- a/magit.el +++ b/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)