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

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

Lines 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)

AltStyle によって変換されたページ (->オリジナル) /