Skip to content

Commit 46c4ec2

Browse files
ghickmanByron
authored andcommitted
Document the use of next to throw an exception when hitting EOF
1 parent a0788e0 commit 46c4ec2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/repo/base.py

+1-1
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)