Movatterモバイル変換


[0]ホーム

URL:


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

Commit3d7eaf1

Browse files
ishepardByron
authored andcommitted
fix decoding problem
1 parenta2d8a51 commit3d7eaf1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎git/objects/commit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ def _deserialize(self, stream):
484484
buf=enc.strip()
485485
whilebuf:
486486
ifbuf[0:10]==b"encoding ":
487-
self.encoding=buf[buf.find(' ')+1:].decode('ascii')
487+
self.encoding=buf[buf.find(' ')+1:].decode(
488+
self.encoding,'ignore')
488489
elifbuf[0:7]==b"gpgsig ":
489490
sig=buf[buf.find(b' ')+1:]+b"\n"
490491
is_next_header=False
@@ -498,7 +499,7 @@ def _deserialize(self, stream):
498499
break
499500
sig+=sigbuf[1:]
500501
# end read all signature
501-
self.gpgsig=sig.rstrip(b"\n").decode('ascii')
502+
self.gpgsig=sig.rstrip(b"\n").decode(self.encoding,'ignore')
502503
ifis_next_header:
503504
continue
504505
buf=readline().strip()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp