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

Appearance settings

Commit 77b20be

Browse filesBrowse files
committed
Document the use of next to throw an exception when hitting EOF
1 parent 7725e03 commit 77b20be
Copy full SHA for 77b20be

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/repo/base.py‎

Copy file name to clipboardExpand all lines: git/repo/base.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ def blame_incremental(self, rev, file, **kwargs):
716716
# Discard all lines until we find "filename" which is
717717
# guaranteed to be the last line
718718
while True:
719-
line = next(stream)
719+
line = next(stream) # will fail if we reach the EOF unexpectedly
720720
tag, value = line.split(b' ', 1)
721721
if tag == b'filename':
722722
orig_filename = value

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.