Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion git/refs/symbolic.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _iter_packed_refs(cls, repo):
"""Returns an iterator yielding pairs of sha1/path pairs (as bytes) for the corresponding refs.
:note: The packed refs file will be kept open as long as we iterate"""
try:
with open(cls._get_packed_refs_path(repo), 'rt') as fp:
with open(cls._get_packed_refs_path(repo), 'rt', encoding='utf-8') as fp:
for line in fp:
line = line.strip()
if not line:
Expand Down
9 changes: 3 additions & 6 deletions git/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,7 @@ def fetch(self, refspec=None, progress=None, **kwargs):
else:
args = [refspec]

proc = self.repo.git.fetch(self, *args, as_process=True, with_stdout=False,
universal_newlines=True, v=True, **kwargs)
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)
if hasattr(self.repo.odb, 'update_cache'):
self.repo.odb.update_cache()
Expand All @@ -805,8 +804,7 @@ def pull(self, refspec=None, progress=None, **kwargs):
# 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,
universal_newlines=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)
if hasattr(self.repo.odb, 'update_cache'):
self.repo.odb.update_cache()
Expand Down Expand Up @@ -840,8 +838,7 @@ def push(self, refspec=None, progress=None, **kwargs):
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,
universal_newlines=True, **kwargs)
proc = self.repo.git.push(self, refspec, porcelain=True, as_process=True, **kwargs)
return self._get_push_info(proc, progress)

@property
Expand Down