summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorTamas Pal <folti@balabit.com>2014-11-05 17:13:31 +0100
committerTamas Pal <folti@balabit.com>2014-11-05 17:13:31 +0100
commit48f5476867d8316ee1af55e0e7cfacacbdf0ad68 (patch)
tree0bb09c673893797115f236836ce865a6710af358 /git/cmd.py
parent27c577dfd5c7f0fc75cd10ed6606674b56b405bd (diff)
downloadgitpython-48f5476867d8316ee1af55e0e7cfacacbdf0ad68.tar.gz
GitRunCommand exception can store stdout output too.
Some git commands, like git merge outputs their problems onto stdout, instead of stderr, which will be thrown away by the current setup. This change allows the GitPython commands to store the stdout's value too, in case of error.
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/git/cmd.py b/git/cmd.py
index b3274dd8..5323a63c 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -380,7 +380,10 @@ class Git(LazyMixin):
# END handle debug printing
if with_exceptions and status != 0:
- raise GitCommandError(command, status, stderr_value)
+ if with_extended_output:
+ raise GitCommandError(command, status, stderr_value, stdout_value)
+ else:
+ raise GitCommandError(command, status, stderr_value)
# Allow access to the command's status code
if with_extended_output: