diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-05-26 19:41:00 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-05-26 19:41:00 +0200 |
commit | 515a6b9ccf87bd1d3f5f2edd229d442706705df5 (patch) | |
tree | 040331b258b8bbc48514ca4242b3f61553e1c02b /git/remote.py | |
parent | 04ff96ddd0215881f72cc532adc6ff044e77ea3e (diff) | |
download | gitpython-515a6b9ccf87bd1d3f5f2edd229d442706705df5.tar.gz |
fix(remote): use universal_newlines for fetch/push
That way, real-time parsing of output should finally be possible.
Related to #444
Diffstat (limited to 'git/remote.py')
-rw-r--r-- | git/remote.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/git/remote.py b/git/remote.py index bff26459..169d4f79 100644 --- a/git/remote.py +++ b/git/remote.py @@ -663,8 +663,8 @@ class Remote(LazyMixin, Iterable): else: args = [refspec] - proc = self.repo.git.fetch(self, *args, as_process=True, with_stdout=False, v=True, - **kwargs) + proc = self.repo.git.fetch(self, *args, as_process=True, with_stdout=False, + universal_newlines=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() @@ -682,7 +682,8 @@ class Remote(LazyMixin, Iterable): # No argument refspec, then ensure the repo's config has a fetch refspec. self._assert_refspec() kwargs = add_progress(kwargs, self.repo.git, progress) - proc = self.repo.git.pull(self, refspec, with_stdout=False, as_process=True, v=True, **kwargs) + proc = self.repo.git.pull(self, refspec, with_stdout=False, as_process=True, + universal_newlines=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() @@ -707,7 +708,8 @@ class Remote(LazyMixin, Iterable): If the operation fails completely, the length of the returned IterableList will be null.""" kwargs = add_progress(kwargs, self.repo.git, progress) - proc = self.repo.git.push(self, refspec, porcelain=True, as_process=True, **kwargs) + proc = self.repo.git.push(self, refspec, porcelain=True, as_process=True, + universal_newlines=True, **kwargs) return self._get_push_info(proc, progress or RemoteProgress()) @property |