From d8c938a812748b638e4ba6c30f7058e3920287b4 Mon Sep 17 00:00:00 2001 From: Timo Juhani Lindfors Date: Tue, 14 Sep 2010 22:33:02 +0300 Subject: [PATCH] Don't use a pty with git processes that take input from magit since that would set the terminal option icrnl which would modify the input. In particular \r would get converted to \n (issue #20). --- magit.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 057c9c85..5f271fa9 100644 --- a/magit.el +++ b/magit.el @@ -1465,7 +1465,10 @@ FUNC should leave point at the end of the modified region" (with-current-buffer input (setq default-directory dir) (setq magit-process - (apply 'magit-start-process cmd buf cmd args)) + ;; Don't use a pty, because it would set icrnl + ;; which would modify the input (issue #20). + (let ((process-connection-type nil)) + (apply 'magit-start-process cmd buf cmd args))) (set-process-filter magit-process 'magit-process-filter) (process-send-region magit-process (point-min) (point-max))