Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a244bd1

Browse files
Replace invalid bytes when decoding TagObject stream
Fixes #943
1 parent 863abe8 commit a244bd1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎doc/source/changes.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Bugfixes
1313

1414
* Changed to use UTF-8 instead of default encoding when getting information about a symbolic reference
1515
(`#774 <https://github.com/gitpython-developers/GitPython/issues/774>`_)
16+
* Fixed decoding of tag object message so as to replace invalid bytes
17+
(`#943 <https://github.com/gitpython-developers/GitPython/issues/943>`_)
1618

1719
3.0.8
1820
=====

‎git/objects/tag.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _set_cache_(self, attr):
5050
"""Cache all our attributes at once"""
5151
if attr in TagObject.__slots__:
5252
ostream = self.repo.odb.stream(self.binsha)
53-
lines = ostream.read().decode(defenc).splitlines()
53+
lines = ostream.read().decode(defenc, 'replace').splitlines()
5454

5555
_obj, hexsha = lines[0].split(" ")
5656
_type_token, type_name = lines[1].split(" ")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /