We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2d8a51 commit 3d7eaf1Copy full SHA for 3d7eaf1
git/objects/commit.py
@@ -484,7 +484,8 @@ def _deserialize(self, stream):
484
buf = enc.strip()
485
while buf:
486
if buf[0:10] == b"encoding ":
487
- self.encoding = buf[buf.find(' ') + 1:].decode('ascii')
+ self.encoding = buf[buf.find(' ') + 1:].decode(
488
+ self.encoding, 'ignore')
489
elif buf[0:7] == b"gpgsig ":
490
sig = buf[buf.find(b' ') + 1:] + b"\n"
491
is_next_header = False
@@ -498,7 +499,7 @@ def _deserialize(self, stream):
498
499
break
500
sig += sigbuf[1:]
501
# end read all signature
- self.gpgsig = sig.rstrip(b"\n").decode('ascii')
502
+ self.gpgsig = sig.rstrip(b"\n").decode(self.encoding, 'ignore')
503
if is_next_header:
504
continue
505
buf = readline().strip()
0 commit comments