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.
This commit is contained in:
Alexey Voinov 2010-03-04 08:07:18 +03:00 committed by Phil Jackson
parent a291507171
commit 37731ad567

View file

@ -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