summaryrefslogtreecommitdiff
path: root/lib/git
diff options
context:
space:
mode:
Diffstat (limited to 'lib/git')
-rw-r--r--lib/git/cmd.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/git/cmd.py b/lib/git/cmd.py
index cf0f066d..1eed1f84 100644
--- a/lib/git/cmd.py
+++ b/lib/git/cmd.py
@@ -107,6 +107,10 @@ class Git(MethodMissingMixin):
status = proc.wait()
proc.stdout.close()
+ if proc.stderr:
+ stderr_value = proc.stderr.read()
+ proc.stderr.close()
+
# Strip off trailing whitespace by default
if not with_raw_output:
stdout_value = stdout_value.rstrip()
@@ -118,7 +122,12 @@ class Git(MethodMissingMixin):
% (str(command), status))
if GIT_PYTHON_TRACE == 'full':
- print "%s %d: '%s'" % (command, status, stdout_value)
+ if stderr_value:
+ print "%s -> %d: '%s' !! '%s'" % (command, status, stdout_value, stderr_value)
+ elif stdout_value:
+ print "%s -> %d: '%s'" % (command, status, stdout_value)
+ else:
+ print "%s -> %d" % (command, status)
# Allow access to the command's status code
if with_status: