Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e393f85

Browse files
author
Owen Smith
committed
Give Popen a silly buffer size, or you only get the first 2^16 bytes
Without this, some commands with large output fail horrible. For example, fetching remotes that have a large ref list: it fetches fine, but then the parsing for FetchInfo dies because the (trimmed) stderr list isn't as long as the list from FETCH_HEAD. I couldn't find a generic way to make this unbounded (temporary files, for example) without rewriting *everywhere* that stdout/stderr is read. Which is...a lot of places.
1 parent 2ffde74 commit e393f85

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git/cmd.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ def execute(self, command,
338338
stderr=PIPE,
339339
stdout=PIPE,
340340
close_fds=(os.name=='posix'),# unsupported on linux
341+
bufsize=(10 *1024 * 1024),
341342
**subprocess_kwargs
342343
)
343344
if as_process:

0 commit comments

Comments
 (0)