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

Commit187fe11

Browse files
committed
Ignore trailing last empty string in .split() output
1 parent903826a commit187fe11

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎git/repo/base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,12 +682,9 @@ def blame_incremental(self, rev, file, **kwargs):
682682
data=self.git.blame(rev,'--',file,p=True,incremental=True,stdout_as_string=False,**kwargs)
683683
commits=dict()
684684

685-
stream=iter(data.split(b'\n'))
685+
stream=(lineforlineindata.split(b'\n')ifline)
686686
whileTrue:
687687
line=next(stream)# when exhausted, casues a StopIteration, terminating this function
688-
ifline.strip()==''orline.strip()==b'':
689-
# Skip over empty lines
690-
continue
691688
hexsha,orig_lineno,lineno,num_lines=line.split()
692689
lineno=int(lineno)
693690
num_lines=int(num_lines)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp