From f8775f9b8e40b18352399445dba99dd1d805e8c6 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 7 Feb 2016 12:20:04 +0100 Subject: fix(cmd): prevent deadlock on clone/fetch/pull We keep stdout closed, which seems to have the side-effect of stdout being connected to your TTY, in case you run a terminal. However, this shold also prevent deadlocks, as only stderr is used. The alternative would have been to try to fetch lines concurrently, and we have been there. For clone(), `communicate()` is used, and with some luck this will just do the right thing. Even though last time I checked, it didn't ... ? Lets see. Stab at #72 --- git/remote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git/remote.py') diff --git a/git/remote.py b/git/remote.py index c1969768..1baacb1b 100644 --- a/git/remote.py +++ b/git/remote.py @@ -650,7 +650,7 @@ class Remote(LazyMixin, Iterable): else: args = [refspec] - proc = self.repo.git.fetch(self, *args, with_extended_output=True, as_process=True, with_stdout=False, v=True, + proc = self.repo.git.fetch(self, *args, as_process=True, with_stdout=False, v=True, **kwargs) res = self._get_fetch_info_from_stderr(proc, progress or RemoteProgress()) if hasattr(self.repo.odb, 'update_cache'): @@ -667,7 +667,7 @@ class Remote(LazyMixin, Iterable): :return: Please see 'fetch' method """ self._assert_refspec() kwargs = add_progress(kwargs, self.repo.git, progress) - proc = self.repo.git.pull(self, refspec, with_extended_output=True, as_process=True, v=True, **kwargs) + proc = self.repo.git.pull(self, refspec, with_stdout=False, as_process=True, v=True, **kwargs) res = self._get_fetch_info_from_stderr(proc, progress or RemoteProgress()) if hasattr(self.repo.odb, 'update_cache'): self.repo.odb.update_cache() -- cgit v1.2.1