summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/cmd.py b/git/cmd.py
index c29e3485..821bf299 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -307,7 +307,7 @@ class Git(LazyMixin):
def __getattr__(self, attr):
return getattr(self.proc, attr)
- def wait(self, stderr=None):
+ def wait(self, stderr=''):
"""Wait for the process and return its status code.
:param stderr: Previously read value of stderr, in case stderr is already closed.
@@ -317,7 +317,7 @@ class Git(LazyMixin):
def read_all_from_possibly_closed_stream(stream):
try:
- return stream.read()
+ return stderr + stream.read()
except ValueError:
return stderr or ''
@@ -678,7 +678,7 @@ class Git(LazyMixin):
# strip trailing "\n"
if stderr_value.endswith(b"\n"):
stderr_value = stderr_value[:-1]
- status = proc.wait()
+ status = proc.wait(stderr=stderr_value)
# END stdout handling
finally:
proc.stdout.close()