Skip to content

Commit 3d0e05c

Browse files
committed
Fix git push hanging when stdout/stderr is big
Fixes gitpython-developersGH-145
1 parent a66cfe9 commit 3d0e05c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git/db/cmd/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,11 @@ def get_push_info(repo, remotename_or_url, proc, progress):
127127
# we hope stdout can hold all the data, it should ...
128128
# read the lines manually as it will use carriage returns between the messages
129129
# to override the previous one. This is why we read the bytes manually
130-
digest_process_messages(proc.stderr, progress)
130+
stdout, stderr = proc.communicate()
131+
digest_process_messages(StringIO(stderr), progress)
131132

132133
output = IterableList('name')
133-
for line in proc.stdout.readlines():
134+
for line in stdout.splitlines():
134135
try:
135136
output.append(CmdPushInfo._from_line(repo, remotename_or_url, line))
136137
except ValueError:
@@ -139,7 +140,6 @@ def get_push_info(repo, remotename_or_url, proc, progress):
139140
# END exception handling
140141
# END for each line
141142

142-
finalize_process(proc)
143143
return output
144144

145145

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy