From 37731ad567d08830197ac146492d8e6c3669f9aa Mon Sep 17 00:00:00 2001 From: Alexey Voinov Date: Thu, 4 Mar 2010 08:07:18 +0300 Subject: [PATCH] Replaced call-process-region with start-file-process and wait. call-process-region doesn't work with remote tramp directories. Staging of diff hunks was broken. --- magit.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/magit.el b/magit.el index ff6ff778..36701b6b 100644 --- a/magit.el +++ b/magit.el @@ -1057,10 +1057,17 @@ Many Magit faces inherit from this one by default." (input (with-current-buffer input (setq default-directory dir) + (setq magit-process + (apply 'start-file-process cmd buf cmd args)) + (set-process-filter magit-process 'magit-process-filter) + (process-send-region magit-process + (point-min) (point-max)) + (process-send-eof magit-process) + (while (equal (process-status magit-process) 'run) + (sit-for 0.1 t)) (setq successp - (equal (apply 'call-process-region - (point-min) (point-max) - cmd nil buf nil args) 0))) + (equal (process-exit-status magit-process) 0)) + (setq magit-process nil)) (magit-set-mode-line-process nil) (magit-need-refresh magit-process-client-buffer)) (t