@@ -909,7 +909,7 @@ class InfoTD(TypedDict, total=False):
909909line_str = line_bytes .rstrip ().decode (defenc )
910910except UnicodeDecodeError :
911911firstpart = ''
912- parts = ['' ]
912+ parts = []
913913is_binary = True
914914else :
915915# As we don't have an idea when the binary data ends, as it could contain multiple newlines
@@ -983,20 +983,21 @@ class InfoTD(TypedDict, total=False):
983983info ['committer' ]+ ' ' + info ['committer_email' ]),
984984committed_date = info ['committer_date' ])
985985commits [sha ]= c
986- blames [- 1 ][0 ]= c
986+ blames [- 1 ][0 ]= c
987987# END if commit objects needs initial creation
988+ if not is_binary :
989+ if line_str and line_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.
997+
988998if blames [- 1 ][1 ]is not None :
989- if not is_binary :
990- if line_str and line_str [0 ]== '\t ' :
991- line_str = line_str [1 :]
992-
993- blames [- 1 ][1 ].append (line_str )
994- else :
995- # NOTE: We are actually parsing lines out of binary data, which can lead to the
996- # binary being split up along the newline separator. We will append this to the
997- # blame we are currently looking at, even though it should be concatenated with
998- # the last line we have seen.
999- blames [- 1 ][1 ].append (line_bytes )
999+ blames [- 1 ][1 ].append (line_str )
1000+ info = {'id' :sha }
10001001# end handle line contents
10011002
10021003info = {'id' :sha }