Skip to content

Commit 938f272

Browse files
author
jcole-crowdstrike
committed
Setting universal_newlines=False explicitly in fetch() and pull().
This fix avoids encoding problems on Windows, as was done for fetch() in the previous commit. However, here it is being made more explicit and adds the same fix for the pull function.
1 parent 4810491 commit 938f272

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: git/remote.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ def fetch(
10681068
Git.check_unsafe_options(options=list(kwargs.keys()), unsafe_options=self.unsafe_git_fetch_options)
10691069

10701070
proc = self.repo.git.fetch(
1071-
"--", self, *args, as_process=True, with_stdout=False, v=verbose, **kwargs
1071+
"--", self, *args, as_process=True, with_stdout=False, universal_newlines=False, v=verbose, **kwargs
10721072
)
10731073
res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
10741074
if hasattr(self.repo.odb, "update_cache"):
@@ -1122,7 +1122,7 @@ def pull(
11221122
Git.check_unsafe_options(options=list(kwargs.keys()), unsafe_options=self.unsafe_git_pull_options)
11231123

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

0 commit comments

Comments
 (0)