8000 Fix RecursionError when iterating streams · arpitjain799/GitPython@5cbc178 · GitHub
[go: up one dir, main page]

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 5cbc178

Browse files
authored
Fix RecursionError when iterating streams
1 parent c84dde2 commit 5cbc178

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git/cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,15 +695,15 @@ def __iter__(self) -> "Git.CatFileContentStream":
695695
return self
696696

697697
def __next__(self) -> bytes:
698-
return next(self)
699-
700-
def next(self) -> bytes:
701698
line = self.readline()
702699
if not line:
703700
raise StopIteration
704701

705702
return line
706703

704+
def next(self) -> bytes:
705+
return next(self)
706+
707707
def __del__(self) -> None:
708708
bytes_left = self._size - self._nbr
709709
if bytes_left:

0 commit comments

Comments
 (0)
0