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

Commit1aaa704

Browse files
committed
Test Dataclass in repo.base.blame() 4
1 parente4761ff commit1aaa704

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

‎git/repo/base.py‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -985,22 +985,21 @@ class InfoTD(TypedDict, total=False):
985985
commits[sha]=c
986986
blames[-1][0]=c
987987
# END if commit objects needs initial creation
988-
ifnotis_binary:
989-
ifline_strandline_str[0]=='\t':
990-
line_str=line_str[1:]
991-
else:
992-
pass
993-
# NOTE: We are actually parsing lines out of binary data, which can lead to the
994-
# binary being split up along the newline separator. We will append this to the
995-
# blame we are currently looking at, even though it should be concatenated with
996-
# the last line we have seen.
997988

998989
ifblames[-1][1]isnotNone:
999-
blames[-1][1].append(line_str)
990+
ifnotis_binary:
991+
ifline_strandline_str[0]=='\t':
992+
line_str=line_str[1:]
993+
blames[-1][1].append(line_str)
994+
else:
995+
blames[-1][1].append(line_bytes)
996+
# NOTE: We are actually parsing lines out of binary data, which can lead to the
997+
# binary being split up along the newline separator. We will append this to the
998+
# blame we are currently looking at, even though it should be concatenated with
999+
# the last line we have seen.
10001000
info= {'id':sha}
10011001
# end handle line contents
10021002

1003-
info= {'id':sha}
10041003
# END if we collected commit info
10051004
# END distinguish filename,summary,rest
10061005
# END distinguish author|committer vs filename,summary,rest

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp