Skip to content

Commit 1bb4651

Browse files
git,remote: use universal new lines for fetch/pull stderr capture
See #1969 stderr parser call RemoteProgress update on each line received. With universal_newlines set to False, there is a mixup between line feed and carriage return. In the `handle_process_output` thread, this is thus seen as a single line for the whole output on each steps.
1 parent 49ca909 commit 1bb4651

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git/remote.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ def _get_fetch_info_from_stderr(
894894
None,
895895
progress_handler,
896896
finalizer=None,
897-
decode_streams=True,
897+
decode_streams=False,
898898
kill_after_timeout=kill_after_timeout,
899899
)
900900

@@ -1071,7 +1071,7 @@ def fetch(
10711071
Git.check_unsafe_options(options=list(kwargs.keys()), unsafe_options=self.unsafe_git_fetch_options)
10721072

10731073
proc = self.repo.git.fetch(
1074-
"--", self, *args, as_process=True, with_stdout=False, universal_newlines=False, v=verbose, **kwargs
1074+
"--", self, *args, as_process=True, with_stdout=False, universal_newlines=True, v=verbose, **kwargs
10751075
)
10761076
res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
10771077
if hasattr(self.repo.odb, "update_cache"):
@@ -1125,7 +1125,7 @@ def pull(
11251125
Git.check_unsafe_options(options=list(kwargs.keys()), unsafe_options=self.unsafe_git_pull_options)
11261126

11271127
proc = self.repo.git.pull(
1128-
"--", self, refspec, with_stdout=False, as_process=True, universal_newlines=False, v=True, **kwargs
1128+
"--", self, refspec, with_stdout=False, as_process=True, universal_newlines=True, v=True, **kwargs
11291129
)
11301130
res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
11311131
if hasattr(self.repo.odb, "update_cache"):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy