diff --git a/git_command.py b/git_command.py index 4b17f78d..2e4974fa 100644 --- a/git_command.py +++ b/git_command.py @@ -503,7 +503,8 @@ class GitCommand(object): A str containing everything read from the in_stream. """ buffer = "" - chunk = in_stream.read1() + read_size = 1024 if sys.version_info < (3, 7) else -1 + chunk = in_stream.read1(read_size) while chunk: # Convert to str. if not hasattr(chunk, "encode"): @@ -513,7 +514,7 @@ class GitCommand(object): out_stream.write(chunk) out_stream.flush() - chunk = in_stream.read1() + chunk = in_stream.read1(read_size) return buffer